Questions tagged [mongodb]
MongoDB is a document oriented database (also known as NoSQL database).
901
questions
6
votes
2
answers
5k
views
what does locked % in mongostat mean?
When running mongostat to look at our mongo database, I'll frequently see the locked % number jump up, sometimes as high as 80%. Here's a few example rows:
insert query update delete getmore ...
6
votes
1
answer
4k
views
Mongodb install fails in Ubuntu 14.04 docker container
I am trying to install mongodb on ubuntu 14.04 in a docker container, using the following steps from the official mongodb guides in my Dockerfile:
RUN sudo apt-key adv --keyserver hkp://keyserver....
6
votes
1
answer
1k
views
MongoDB Disaster Prep on AWS
I'm looking for best practice advice covering MongoDB disaster recovery within an AWS hosted environment.
Our setup is fairly standard at this point, replica set of 3 servers (1 primary, 1 secondary, ...
6
votes
3
answers
8k
views
Mongo secondaries stuck at startup state
I have a MongoDB replica set with secondaries that won't make it past the STARTUP state. The database is large but they should have moved to STARTUP2 by now. The correct ports are open as I can ...
6
votes
2
answers
4k
views
Mongo Sharding - Config Server and Mongo Authentication
I am needing to shard a database fairly soon, and am unclear on what the best practice is for enabling authentication on the mongos and config servers.
I would like to have everything be secured with ...
6
votes
1
answer
9k
views
High CPU usage on mongodb server when idle?
I'm getting strange usage numbers on MongoDB server when it is in almost idle state: http://pastebin.com/cKVyGMts (no queries) DB size is about 3.3 Gb.
I can see in mongodb.log that snapshotthread is ...
5
votes
5
answers
8k
views
MongoDB and ZFS bad performance: disk always busy with reads while doing only writes
I have huge performance issues using MongoDB (i believe it is mmapped DB) with ZFSonlinux.
Our Mongodb is almost only writes. On replicas without ZFS, disk is completely busy for ~5s spikes, when app ...
5
votes
2
answers
9k
views
Unable to start MongoDB on Ubuntu 10.10
I've just installed MongoDB on a fresh Ubuntu 10.10 installation, but I'm having trouble getting it to start (at all). I'm using the latest mongo-stable package via. http://www.mongodb.org/display/...
5
votes
2
answers
8k
views
mongod fork vs nohup
I'm currently writing process management software. One package we use is mongo.
Is there any difference between launching mongo with
mongod --fork --logpath=/my/path/mongo.log --logappend
and
...
5
votes
2
answers
22k
views
How to auto-start MongoDB on CentOS reboot?
How do I setup MongoDB so that it will start back up automatically after a server reboot? This is on CentOS 5.5.
I start it with the following command, but if the server reboots, I have to login to ...
5
votes
2
answers
897
views
Should I install MongoDB using Ubuntu's repository or MongoDB's private repository?
I was reading the MongoDB install instructions and noticed they have a private repository that the instructions tell you to add. I'm wondering if this is really needed because MongoDB is also in the ...
5
votes
1
answer
11k
views
MongoDB virtual memory usage
I'm testing MongoDB for archives data. We have a collection with 160M rows.
MongoDB instance takes 76.2 Gb virtual memory on a 12 Gb physical memory box ;-)
The swap in null.
I read that virtual ...
5
votes
1
answer
3k
views
Why would using MongoDB in lieu of etcd as a key value store be a good or bad idea? [closed]
I'd like to get general thoughts from the community as to why MongoDB for key/value would OR would not be a suitable replacement for etcd or other purpose-built key/value store system (consol, ...
5
votes
2
answers
10k
views
Readahead for /var/lib/mongo is set to 4096KB
I'm trying to set the readahead for mongo 256 or less as recommended, I looked at the documentation for any guidance and I found this:
Ensure that readahead settings for the block devices that ...
5
votes
2
answers
2k
views
Should I disable turn off MongoDB profiler in production machine?
The default according to [1] is collect profile data when execution time > 100ms
But one of the issue is when majority of queries' execution time > 100ms, our system start to overload and I am not ...
5
votes
1
answer
6k
views
Multiple MongoDB instances on same server
We set up a MongoDB development server on CentOS 6.3 and were able to separate different projects by using separate config files and rc scripts. Now we're looking at setting up a MongoDB production ...
5
votes
1
answer
590
views
Sharding MongoDB internationally with data stored based on location
We're looking to set up data centers globally and switch to a NoSQL database like MongoDB to support having our data distributed over these data centers (and as a pleasant side effect, introduce more ...
5
votes
2
answers
11k
views
MongoDB "too many files open" even after setting limits
When MongoDB starts up, I am greeted with a "too many files" error, even after editing /etc/security/limits.conf and setting the limit to unlimited.
Mar 09 18:29:13 ns524052 mongod[1298]: 2017-03-...
5
votes
2
answers
19k
views
Can't config replica set using MongoDB 3
I'm trying to create a replica set in MongoDB version 3.04.
I followed this tutorial and getting the next error while trying to add nodes using the primary server:
vacrep:PRIMARY> rs.add('server ...
5
votes
1
answer
428
views
Upgrading a mongo cluster
I am looking at adopting a Mongo cluster and am doing research. We hope to have a cluster that can scale from 10k updates per second to 100k updates per second with very write heavy traffic.
The ...
5
votes
1
answer
2k
views
MongoDB Socket Exceptions when moving chunks
I have 2 shards in my mongodb db cluster, with 1 mongos server. I have a total of 8 servers, with one replica set having 5 and the other 3. I have a single collection that is sharded across the ...
5
votes
1
answer
4k
views
How to downgrade mongodb 3.4.2 to 2.6.11?
I had mongodb 2.6.11 installed on my CentOS sandbox server.
Dec 03 22:24:38 Updated: mongodb-org-mongos-2.6.11-1.x86_64
Dec 03 22:25:07 Updated: mongodb-org-tools-2.6.11-1.x86_64
Dec 03 22:25:08 ...
5
votes
1
answer
8k
views
MongoDB rs.initiate error: replSetInitiate quorum check failed because not all proposed set members responded affirmatively
I have to start my own replica set with internal authentication enabled using X.509 certificates, but I failed. Any advice is welcome.
MongoDB 3.2 x64 on Debian 8.2 x64.
It is a problem from the ...
5
votes
1
answer
243
views
MongoDB Oplog Security
We are using a MongoDB replica set for sharing sessions and other (potentially sensitive) data in a web farm.
All the data we store uses TTL indexes to expire documents after a relatively short ...
5
votes
0
answers
5k
views
Corrupt WiredTiger MongoDB files
I'm running MongoDB with the WiredTiger engine on an ext4 file system. The last thing that I did was start building an index, but then something came up and I needed to cancel the index build and ...
4
votes
2
answers
2k
views
MongoDB best practice against constant power failure
Background:
I have some AIO application machines, (running ubuntu with rails + mongodb + chromium) in one machine on a mobile coach for displaying information, occasionally user might change chuck ...
4
votes
2
answers
27k
views
MongoDB Auth, can be authenticated in the shell but not via the command line
I have an application that connects to a MongoDB database called discussions. I've created a user
Mongo shell:
> use discussions
switched to db discussions
> db.auth("discussions","XXXXXXXXX")...
4
votes
2
answers
3k
views
How to change the master in a MongoDB cluster without restarting the process?
Reading the documentation of MongoDB about how to configure a master-slave configuration of a cluster (our cluster will have more than 12 nodes, so unfortunately we can't have a replica-set ...
4
votes
2
answers
6k
views
nginx reverse proxy to mongodb rest interface
I'm trying to set up a reverse proxy with HTTP auth that proxies MongoDB's REST interface. So far, I've got this:
server {
listen 80;
server_name tld.example.com;
charset utf-...
4
votes
1
answer
5k
views
Shutting down MongoDB with a command line command, is it possible?
Can I shutdown mongoDB with a command line command?
I use MacOSX but it may be similar as in linux.
If not, does someone know how I can make a script that would enter the mongo shell and shut the ...
4
votes
1
answer
969
views
MongoDB Sharding Config and MongoS Storage
In doing this year's budgeting, I need to estimate the capacity needs for next year. We are planning on needing to shard our MongoDB Replica Set out to 4-shards, but I have the disk capacity needs ...
4
votes
2
answers
441
views
Mongodb ubdate on Ubuntu 10.04 LTS
I installed MongoDB on live VPS to write logs. The server is running on Ubuntu 10.04 LTS and Mongodb version is 2.0.3. I want to upgrade to latest version (2.0.5) but I want to upgrade only MongoDB. I ...
4
votes
1
answer
3k
views
MongoDB sharding: mongos and config servers together?
We want to create a MongoDB shard (v. 2.4). The official documentation recommends to have 3 config servers.
However, the policies of our company won't allow us to get 3 extra servers for this purpose....
4
votes
2
answers
6k
views
I need nodejs and mongodb to handle 5000 requests per second
As the title suggested, I need nodejs and mongodb to handle 5000 requests per second. Right off the bat that is. We'll grow to many times that eventually.
My initial thoughts are to put each on ...
4
votes
1
answer
2k
views
Unable to connect to a remote database
I'm playing with MongoDB. I have a good deal of experience with MySQL and was using something called Sequel Pro to connect to remote databases. I'm now trying MongoHub but can't seem to get it to ...
4
votes
1
answer
15k
views
How to expose and access MongoDb ports in Kubernetes?
I have mongoDB deployed on Kubernetes. The Database is setup properly and can be accessed using its internal dns name.
I need to expose this to the outside world. I have used node port/ loadbalancer ...
4
votes
1
answer
4k
views
installing mongodb on 14.04
I was trying to install mongodb into a fairly clean Ubuntu 14.04. I used the following commands:
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10
echo 'deb http://downloads-...
4
votes
1
answer
3k
views
Can I use MongoDB with Amazon EC2 small instance?
I want to move my MongoDB from a virtual server to amazon web services. I know MongoDB provides a preconfigured AMI, with three provisioned EBS volumes. But this is only available for m1.large ...
4
votes
2
answers
231
views
Mongo database replicas on the same machines as load balanced webservers?
We're testing deployment of a web app on Amazon's EC2 which uses MongoDB for the database. Mongo recommends using at least 3 nodes for replication for data integrity. Although this is testing, we'd ...
4
votes
1
answer
569
views
Running mongos as a reliable service on Windows Server 2008R2 (64-bit)
Can anyone provide any information on running mongos as a reliable service on a Windows Server 2008R2 (64-bit) Web server? 10Gen suggests using the Windows Server 2003 Resource Kit Tools, but they are ...
4
votes
2
answers
3k
views
MongoDB Sharding on single linux machine
Let's say I wanna have a MongoDB Server with 5 shards on one machine and each shard having replica set of 3 servers.
Would that increase performance? What are downsides of this?
4
votes
2
answers
4k
views
Mongodb sharding - Init script for mongos process?
I've been running mongodb as a replica set, and have recently attempted to move to a sharded cluster.
One thing I'm a little unsure about is how I should be starting the mongos process. Previously I ...
4
votes
3
answers
3k
views
mongoid connection issue
I've been trying to use Mongoid with Rails on Ubuntu. Mongodb was working fine for me with rails app 3.0 to 3.2.
Today suddenly, I am getting an error:
/home/pravinmishra/.rvm/gems/ruby-1.9.2-p318/...
4
votes
1
answer
3k
views
MongoDB SSL encryption and Spring's Driver
There is very limited information regarding MongoDB and SSL encryption for the transport between replica sets and drivers (java clients). Anyone have any experience setting this up? Looking to have ...
4
votes
1
answer
18k
views
Mongodb doesn't start using systemctl
When I try to start the mongo service(systemctl start mongodb) I get this error in journalctl:
Mar 21 15:36:18 redhat7 systemd[1]: Started High-performance, schema-free document-oriented database.
...
4
votes
1
answer
9k
views
keepalived: 2nd VRRP_Script never seems to run
I'm trying to implement keepalived on 3 mongodb boxes, the idea is that if mongod on one of the boxes goes down or we need to move the primary node to another system for some reason our application ...
4
votes
1
answer
2k
views
mongo as service error: Cannot determine state of server
I am trying to use mongodb as a service and started with heroku services ie dashboard.heroku.com/apps/scaleqamongo/resources. I tried multiple addons which they call like mongolab, mongohq. I create ...
4
votes
1
answer
3k
views
How to calculate the required EBS PIOPS for our mongo server?
We want to use provisioned IOPS EBS volume on our mongo machines, I'm a bit confused on how to calculate the number of provisioned IOPS to use.
Currently we're getting an average of 25 IOPS (read + ...
4
votes
1
answer
2k
views
MongoDB Replica-Set with Replication Lag on one node only
we experience a strange behaviour in our MongoDB Replica-Set, setup of 3 Nodes (all Xeon Quad-Core-Class CPUs, 16GB of RAM for one, 24GB for the other two nodes)
The one node with less RAM is normal ...
4
votes
2
answers
2k
views
what is best multi-server configuration with OpenVPN
We have a number of Database severs running MongoDB on Debian plus a number of Application servers also on Debian. The db servers hold replicating db clusters, so they need to talk to each other. ...