Skip to main content

Questions tagged [mongodb]

MongoDB is a document oriented database (also known as NoSQL database).

Filter by
Sorted by
Tagged with
61 votes
6 answers
87k views

How can I run mongod in the background on unix (mac osx)?

I would like to run mongod in the background as an always present sort of thing. What would be the best way to do this? Kind of like the way I can run MySQL on startup and it's just always there ...
rmontgomery429's user avatar
46 votes
1 answer
68k views

how to install an older version of a pecl package

I have this code $passengerId = new \MongoId(oPassenger->getId()); return $this->createQueryBuilder('Device') ->update() ->multiple(true) ->field('...
abbood's user avatar
  • 1,137
31 votes
5 answers
8k views

Turning off atime on a filesystem

I am setting up a mongoDB replica set and one of the first things I am suppose to do is turn off atime on the file system. After researching this a bit, I am not opposed to doing this, but I have to ...
QWade's user avatar
  • 927
29 votes
2 answers
144k views

how to connect to mongodb server via ssh tunnel

It was easy for me to connect to my remote mysql server on AWS using a sequelpro, however I'm struggling with doing the same thing with mongodb. I tried setting up an ssh tunnel via command line ...
abbood's user avatar
  • 1,137
22 votes
4 answers
116k views

How to reset MongoDB replica set settings

I want to start over the configurations of replica, is it possible? How to reset it? In group people saying to remove the database content, but are there any work around?
Ryan's user avatar
  • 6,101
21 votes
6 answers
52k views

Mongodb - proper way to rotate logs

Mongo docs say that I can: use -SIGUSR1 signal and get the old log renamed and current switched use logrotate from OS I want the OS's logrotate ability to zip old files and remove oldest, but see no ...
Andrey Regentov's user avatar
19 votes
2 answers
76k views

/etc/security/limits.conf soft nproc limit appears to be ignored

My MongoDB database was running into problems under load, with the following errors spamming the logs: [initandlisten] pthread_create failed: errno:11 Resource temporarily unavailable [initandlisten] ...
John M's user avatar
  • 333
16 votes
1 answer
23k views

"Excess arguments." while doing "systemd daemon-reload" during MongoDB configuration

I am following the instruction mentioned in : To install and configure the basic elements for MongoDB in Ubuntu. During "Configure MongoDB username and password", on phase 4 "Step 4 - Enable mongodb ...
Papal's user avatar
  • 163
16 votes
2 answers
15k views

Does a MongoDB replica set require at least 2 or 3 members?

Documentation here says three: http://docs.mongodb.org/manual/tutorial/deploy-replica-set/ "A replica set requires three distinct systems..." Whereas the documentation here says two: http://docs....
cat pants's user avatar
  • 2,313
14 votes
4 answers
26k views

Why after deleting a 110+ GB collection, my /var/lib/mongodb directory still have same size?

I am having some troubles with MongoDB and space usage. In particular, I once used to have a large collection of about 600 million records totaling 110+ GB on disk. Recently I decided to drop it ...
tunnuz's user avatar
  • 427
14 votes
1 answer
16k views

Is it possible to recover MongoDB databases from .ns and .0, .1, . ... files?

I have a MongoDB 2.0.4 installation on Ubuntu 12.10. Recently I had some problems connecting to the database from the outside, and figured out there was something which prevented MongoDB from starting ...
tunnuz's user avatar
  • 427
13 votes
3 answers
6k views

MongoDB and datasets that don't fit in RAM no matter how hard you shove

This is very system dependent, but chances are near certain we'll scale past some arbitrary cliff and get into Real Trouble. I'm curious what kind of rules-of-thumb exist for a good RAM to Disk-space ...
sysadmin1138's user avatar
  • 134k
12 votes
8 answers
15k views

What hardware makes a good MongoDB Server ? Where to get it?

Suppose you're on dell.com right now and you're buying a server to run your MongoDB database for your small startup. You will have to handle literally tens of thousands of writes and reads per minute (...
João Pinto Jerónimo's user avatar
12 votes
2 answers
16k views

Multiple Mongos on one server

I'm not talking about sharding. We had a testing server (linux) and there is already one mongo which belongs to another project/subteam. Is it possible to run multiple, isolated instances of mongodb ...
om-nom-nom's user avatar
12 votes
3 answers
73k views

Cannot connect to MongoDB in docker

Using the official mongo image from the docker hub, I run the following command to get it running: docker run --name api -p 127.0.0.1:27017:27017 -p 127.0.0.1:28017:28017 -d mongo Then from another ...
wheeler's user avatar
  • 299
12 votes
1 answer
10k views

What is the minimum amount of servers for a production mongoDB cluster?

On the mongoDB documentation for a production cluster architecture I read that the minimum amount of servers for a running production mongoDB cluster is 7: Is it possible to share the routers, config ...
Mat's user avatar
  • 1,913
12 votes
3 answers
8k views

node.js, mongodb, redis, on ubuntu performance degradation in production, RAM is free, CPU 100%

As the question title suggests, I'm having an hard time to figure out what can be improved on my application(or tuned in the os, ubuntu) to achieve an acceptable performance. But first I'll explain ...
Franjanko's user avatar
  • 276
11 votes
1 answer
9k views

How to get the MongoDB' current working set size

From the doc , it said "For best performance, the majority of your active set should fit in RAM." So for example, my db.stats() give me { "db" : "mydb", "collections" : 16, "objects" : 21452, "...
Howard's user avatar
  • 2,195
11 votes
2 answers
22k views

How can I connect to a MongoDB Replica Set behind a proxy?

I have a MongoDB Replica Set on the cloud service. For security reason, the replica set is available to the cloud's internal network. I followed that cloud service's guide and setup a proxy to each ...
Albert Zhong's user avatar
11 votes
3 answers
2k views

Is this a valid backup strategy for MongoDB?

I've got a single dedicated server with a MongoDB database of around 10GB. I need to do daily backups, but I can't have downtime with the database. Is it possible to use a replica set on a single disk ...
James Simpson's user avatar
10 votes
5 answers
30k views

How to set ulimits for mongod?

How do I set ulimits for the mongod process/user on CentOS? I've read the official documentation but it doesn't provide OS-specific instructions. I need to set ulimit -u 64000 and need this to ...
Tim's user avatar
  • 604
10 votes
4 answers
44k views

Why are my MongoDB queries really, really slow?

I've inherited a large MongoDB server at work, and have been tasked with figuring out why queries run against it are so slow. The DB contains tons and tons of records (on the order of 10^9) and takes ...
Mark LeMoine's user avatar
10 votes
1 answer
55k views

Easiest way to restart MongoDB

What's the easiest and safest(low data loss, no file locking issues) way to restart mongodb on a production system?
mixdev's user avatar
  • 383
10 votes
2 answers
5k views

How To: Dockerized MongoDB Replication on Elastic Container Service

I have a Node.js app together with a MongoDB database running on AWS ECS. The setup I've got currently is formed of 2 ELB's and 2 Instances running each a Docker container with its assigned service (...
Claudiu S's user avatar
  • 201
9 votes
2 answers
9k views

pecl install mongo - keeps compiling with wrong module API

Working with Ubuntu 12.04 here, nginx and php5-fpm I had mongo working well on php 5.3, then I added the ondrej/php5 ppa and updated to php5.4. It kept GD and CURL extensions, but not mongo. I re-...
kavisiegel's user avatar
9 votes
4 answers
15k views

Unable to install MongoDB 3.4 on Debian stretch

I added mongodb repo to source list: deb http://repo.mongodb.org/apt/debian jessie/mongodb-org/3.4 main Then apt-get update. When I try to install mongodb-org I'm getting this: root@ns:~# aptitude ...
ponury-kostek's user avatar
9 votes
3 answers
14k views

Run a MongoDB configuration server without 3GB of journal files

For a production sharded MongoDB installation we need 3 configuration servers. According to the documentation "the config server mongod process is fairly lightweight and can be ran on machines ...
Thilo's user avatar
  • 240
9 votes
3 answers
11k views

Why can't i install mongodb 3.0 on Ubuntu 14.04 32bit?

I have followed all the official istructions listed here: official page In detail, i have done: sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10 (seems ok) echo "deb ...
Moppo's user avatar
  • 193
8 votes
5 answers
20k views

How to make a secure MongoDB server?

I'm wanting my website to use MongoDB as it's datastore. I've used MongoDB in my development environment with no worries, but I'm worried about security with a public server. My server is a VPS ...
Earlz's user avatar
  • 1,039
8 votes
2 answers
7k views

How can I exclude a package from yum-cron but not from manual "yum upgrade"?

I've just gone through my servers and installed yum-cron (and then enabled with chkconfig yum-cron on since that doesn't seem to happen automatically). Now I realise that I'm running a MongoDB ...
Nic Cottrell's user avatar
  • 1,332
8 votes
7 answers
18k views

Restarting MongoDB automatically if it crashes

I am running MongoDB on an Ubuntu server. It's using an upstart script to start mongod when the machine boots. I noticed that if the process crashes, it doesn't get restarted. How can I make sure ...
Flavien's user avatar
  • 367
8 votes
4 answers
29k views

Using mongodb tools (mongodump, mongorestore) from another machine

I have a mongodb server (A) and a http server (B). I would like to run mongodump and mongorestore commands on http server (B) to backup data on server B. But these tools comes with mongodb ...
edigu's user avatar
  • 271
8 votes
3 answers
7k views

How to correctly configure MongoDB to use Letsencrypt SSL on Ubuntu

How do I correctly configure MongoDB to use Letsencrypt SSL on Ubuntu? I have created an SSL certificate using Letsencrypt and combined it via: cat /etc/letsencrypt/live/example.com/fullchain.pem /...
Petah's user avatar
  • 650
8 votes
2 answers
33k views

SocketException in Mongo logs

We are running mongo for 4 months so far , But lately I am seeing a lot of SocketException handling request, closing client connection: 9001 socket exception [2] server [127.0.0.1:58996] How can I ...
Dina Abu-khader's user avatar
8 votes
5 answers
20k views

Create a new user for MongoDB inside Docker

I'm using the default MongoDB Docker image and I'm trying to create a new user for the database. I'm currently trying to do it this way: FROM docker.io/mongo:3.2 MAINTAINER <alexandernst> ...
alexandernst's user avatar
8 votes
2 answers
2k views

MMS gets hostname from uname and can't connect to it

I'm trying to get 10gen's MongoDB Monitoring Service monitoring my 3-node replica set. The replica set running in an AWS VPC. Each node runs on a different [virtual] machine. Assume their IPs are 192....
Adam Monsen's user avatar
7 votes
5 answers
2k views

NoSQL databases for PHI?

Are the fast, document-based NoSQL solutions--MongoDB, Cassandra, CouchDB, etc--appropriate for PHI data? They have performance advantages compared to RDBMS for sure, but in general appears less ...
Ming K's user avatar
  • 173
7 votes
1 answer
5k views

Why do I see many mongod processes running?

I am running a single MongoDB database. No sharding. When I run htop, I see a lot of instances of mongod. Is that normal? Does every connection create a separate mongod process? Should I be concerned? ...
burger's user avatar
  • 233
7 votes
3 answers
5k views

Why doesn't MongoDB automatically restart?

It seems like MongoDB 3.6 isn't automatically configured to restart if it crashes. Looking at the systemd service that is bundled with the latest .deb package for Ubuntu 16.04LTS it doesn't seem to ...
four43's user avatar
  • 2,875
7 votes
1 answer
10k views

Understanding IXSCAN and COLLSCAN in MongoDB logs

I'm attempting to grep through some Mongo logs in an attempt to find slow operations that I need to optimize. Slow query logging is at the default and is logging operations over 100ms. I think ...
Antonius Bloch's user avatar
7 votes
5 answers
25k views

Unable to rsync due to broken pipe

I'm trying to mirror a large Mongo database between from a production server to a dev environment by stopping Mongo on both servers and then running the command: rsync --archive --delete --recursive -...
Cerin's user avatar
  • 3,670
7 votes
1 answer
11k views

MongoDB getting OOM killed

we are running a mongodb replicaset on three machines. All three machines have around 16GB but only 255MB Swap. Swappiness is left on it's default value 60. The machines are running CentOS 6.4. The ...
bjoernhaeuser's user avatar
7 votes
1 answer
2k views

mongod: symbol lookup error: mongod: undefined symbol: _ZN5boost6detail13once_epoch_cvE

Iam having trouble with my mongodb install : when I run sudo mongod, I get mongod: symbol lookup error: mongod: undefined symbol: _ZN5boost6detail13once_epoch_cvE uname -a Linux xyz 3.2.0-4-686-pae #...
3agelx45's user avatar
7 votes
2 answers
8k views

Installing multiple mongoDB versions on the same server

I have installed a 2.4 mongoDB version and I'd like to compare against the recently released 2.6 version. I want to know if possible to do a clean new install rather en an update to see if those two ...
pedrommuller's user avatar
7 votes
1 answer
1k views

Does MongoDB need to be restarted to reload a CRL?

I'm running a MongoDB replica set with TLS/SSL. I'm also using a CRL to block revoked certificates for clients. Relevant configuration of a replica set member follows. net: ssl: mode: ...
Rafa Viotti's user avatar
6 votes
5 answers
19k views

mongoDB won't connect remotely

I have installed mongoDB on a redhat virtual machine on EC2. The server is running perfectly locally, I can connect and execute commands, etc. Now, I tried connecting remotely from another virtual ...
Enrico Tuttobene's user avatar
6 votes
3 answers
1k views

MongoDB on NVMe in production

I'm setting up my db production environment and I have some questions. The server has two NVMe disks, but they cannot be used in the hardware RAID controller. Do I need RAID with NVMe? Would it be ...
Green's user avatar
  • 163
6 votes
1 answer
2k views

How can I filter MongoDB Replica Set Heartbeats with tcpdump?

Occasionally, when troubleshooting the health of a replica set, I'd like to filter out the heartbeat packets specifically, track them going out, and the subsequent reply (or lack thereof) without all ...
Adam C's user avatar
  • 5,242
6 votes
3 answers
20k views

How to start Mongo daemon with auth support

I want to start the MongoDB daemon with auth support using the Mongo init script: sudo /etc/init.d/mongod start I have also added db users to the database to authenticate. I'm working with two ...
Scott 's user avatar
  • 163
6 votes
1 answer
17k views

mongoexport csv output array values

I'm using mongoexport to export some collections into CSV files, however when I try to target fields which are members of an array I cannot get it to export correctly. command I'm using: ...
9point6's user avatar
  • 175

1
2 3 4 5
19