All versions of MongoDB - a scalable, high-performance, open source, document-oriented database.

learn more… | top users | synonyms

0
votes
1answer
74 views

Replica set read preference nearest is still slow

NOTICE: I've also posted this to stackoverflow. I'm not sure where this question belongs. If it's not here, tell me, and i'll delete it. I'm testing my replica set, in particular the read preference, ...
1
vote
1answer
52 views

How to add shards in mongodb cluster?

I am implementing mongodb cluster. Config server and router working fine but when i am adding shards from server i am getting a error. { "ok" : 0, "errmsg" : "couldn't connect to new shard ...
3
votes
1answer
71 views

Mongo Scaling - Too Many Connections - Linear Horizontal Scaling with 100s of App Servers

I have a Mongo Cluster. It's sharded on 6 servers, with 6 replica sets, each replica set having one Primary, and two Secondaries. Additionally, there are 3 config servers. Though, I think the Mongo ...
0
votes
1answer
55 views

Fastest way to sync (or keep import) 3.5TB data from hadoop to sharded mongodb cluster

There are 3.5TB data in our hadoop cluster(yes on hdfs). And we have newly built a sharded mongodb cluster(the latest 3.x) with 3 mongos, 3 configdb and 3 shards(each shard has 1 primary and 2 ...
0
votes
1answer
59 views

Mongodb background indexing - no progress

I have added a couple of background indexes on few collections on mongodb replicaset (3.0.2, MMAPv1 storage), and since then I'm seeing following entry in db.currentOp(true) response in all nodes ...
0
votes
0answers
14 views

Where to store data on AWS?

I'm using AWS to host my application, and I'm using mongodb as db. I have installed mongodb on amazon ec2, but now I have no idea about where I should store all of my data. Can I store all of my data ...
0
votes
1answer
48 views

MongoDB switch to smallfiles

I've reached a point where mongo fails to start because there's no enough free disk space. The log suggests using the --smallfiles option to start the mongod service. So, I have two options, either ...
1
vote
1answer
126 views

Mongo Storage Engine from mmap to wiredTiger

We have a mongo(v3.0.3) database->collections which is in mmap storage engine. We are trying to change it to wiredtiger we tried the process below.But we still see the same old storage engine ...
0
votes
1answer
19 views

Handling modifications of fields within a document

I have a basic web app where with the following hierarchy being persisted >User1 >Client1 >ID >Name >Profession >Client2 >ID >Name >Profession ...
2
votes
1answer
59 views

MongoDB Ops Manager - CPU Time - No data available

We have 5 groups and enabled on all groups monitoring agent. We use Ops Manager 1.6.2.251. All metrics get collected and are available in a nice graph. CPU Time is not available on all groups. Our ...
2
votes
1answer
76 views

Steps to setup mongo replica set

I am having problems setting up a mongo replica set. I have 2 servers and want one to be primary and one to be secondary. On primary machine in mongod.conf: replSet=rs1 Then in the console I ...
1
vote
2answers
71 views

parse rs.status() output to display one secondary node for mongodump destination

I wish to run mongodump to secondary (not primary). So I need as output hostname and port of one secondary. # ./mongo -udbadm admin --port 27100 -p --quiet --eval ...
0
votes
1answer
67 views

What are minimum configurations for mongodb replica set though a java program

I'm new to morphia. I'm using morphia and mongo-java-driver.jar to talk with replicaset(I need for cluster also) through a java program. I'm new to morphia. Wrote a sample program code is below ...
1
vote
1answer
245 views

MongoDB update object in Array

I have the following document: { "name" : "student_1", "courses" : [ { "name" : "Algebra", "grades" : [ 98, 96, 92 ] }, { "name" : ...
0
votes
1answer
131 views

How to setup sync between MongoDB and C# .NET Application

What is the best practice to synchronize a MongoDB remote database with a C# .NET App that would allow queries to be responded to within the local file system and update itself when there is a change ...
0
votes
0answers
29 views

mongodb: fail for removing shard from shardings

When I try to remove a shard from my mongodb sharding, I got the following error: Sun Sep 6 11:30:09 [Balancer] going to move { _id: ...
0
votes
0answers
20 views

2dsphere index - warning insert of geo object generated lots of keys

When i try to create an index on {areaPolygon: "2dsphere"} i am getting the following warning: insert of geo object generated lots of keys (17618) consider creating larger buckets. obj={ _id: ...
0
votes
0answers
15 views

mongodb sharding by id, based on the first 8 characters

we have a database full of grams,and they're organised in a tree fashion, with parent references, like so: _id: gram:a;p1:as;p2;astr;p3;astrot;p4:astrotur;word:astroturf we would like to chunk the ...
1
vote
2answers
104 views

What will happen if the primary shard for a mongodb database is down?

Well as I understand each database has it's primary shard, which is mostly the first shard added to mongodb cluster. And we know that balancer will not split chunks until the chunksize is bigger than ...
2
votes
0answers
28 views

Impact of adjusting Time of Mongodb server?

Using Ubuntu 14.04 and mongodb 2.6.10 I have time difference between a replica machine and primary , my secondary isn't configured with NTP what are the implications of adjusting time on the ...
4
votes
1answer
54 views

What exactly are secondary members acknowledging in replicasets with MongoDB?

I try to understand the mechanics and behavior of MongoDB's replica-features better. I hope to get some insightful information from someone who is familiar with mongo's internals and behaviour. My aim ...
1
vote
1answer
1k views

How restore a specific database from backup using mongorestore command

I created a backup of my all database using mongodump command. Now I want to restore a specific database using mongorestore command. How is this possible, I use this command: --db option then mongodb ...
0
votes
1answer
182 views

mongod 2.6 corruption (Assertion failure isOk() src/mongo/db/storage/extent.h 80)

I have been using mongo 2.6.0 for some time on 64-bit centos (with journaling enabled). One fine day when we were testing to insert a document to one of the collections, we started seeing data ...
0
votes
0answers
60 views

how to restore the copied mongodb files in a server?

I have copied mongodb database files from my local machine into a server. How can i restore these files in the server and use them? Please help.
1
vote
0answers
58 views

Why mongodb never end some connection

My mongod runs out of connections from time to time. But when I restart the instance, it becomes normal. I check the log and found some connections were created and never be ended. This cause the ...
0
votes
0answers
65 views

Replica Set elected a new primary - i/o timeout on ping

We received this MMS Alert (log level INFO): Replica Set elected a new primary I browsed /var/log/mongodb-mms-automation/automation-agent-verbose.log [2015/09/01 03:45:08.305] [.debug] ...
2
votes
1answer
54 views

How to deploy MongoDB config servers to achieve maximum availability during network partitions?

What's the recommended way to deploy config servers? Assume, we have two shards, each one is a 3-nodes replica set. If I deploy all config servers together with one of these shards, a single network ...
0
votes
2answers
337 views

Locked out of my own database through invariant() failure

I am trying to set up mongodb on my own server and connect to it remotely through my laptop. I had successfully installed the database and created my own user with admin privileges. However, when I ...
0
votes
1answer
44 views

No Data Replication in Progress mongodb

Setup Information One ConfigServer mongod.exe --configsvr --dbpath C:\MongoDBCluster\ConfigSrv --Mongos Server-- mongos.exe --configdb 10.133.1.130) 2 Shard Servers mongod.exe --shardsvr ...
1
vote
1answer
63 views

What kind of database should I use?

I'm designing a new system and I'm wondering what kind of DB should I use for my needs. I have a tree structure of nodes, where each node has historic values. For each historic value it should hold 2 ...
0
votes
0answers
23 views

GridFS “UPLOAD-ONLY” permissions

I need to allow UPLOAD-only to GridFS. Does restricting role to "insert" to fs.files and fs.chunks do the trick? Does GridFS perform any actions except "insert" onto fs.files during upload?
0
votes
1answer
21 views

Mongo DB Site to Site Migration

I am somewhat new to MongoDB but I do have some experience with MySQL and PostgreSQL. Currently, I need to migrate Mongo DB from one site to another. The sites should be identical (development and ...
1
vote
1answer
53 views

Monitor disk usage with MongoDB Ops Manager

We use MongoDB Ops Manager 1.6.2.251. I searched Activity -> Alert Settings. Is there a way to monitor disk usage? To get an alert if this changes to 90%: # df -h /data/ Filesystem ...
1
vote
1answer
126 views

What's the procedure to set up username/password on mongodb?

I have tried setting up username / password .But none of the methods seems to work. 1. In mongod.conf ----> remove **#auth=true** to **auth =true** 2.Started the mongod server --> sudo ...
0
votes
0answers
58 views

How to read from Mongodb secondary Only in a replica set?

Mongodb version 2.6.10 Ubuntu 14.04 Currently having a replica set of 4 nodes , my read preference is Primary Only , I configured one node with priority 0 Also i have a file on the priority 0 node ...
0
votes
0answers
66 views

MongoDB Slow updates

My application is doing extremely slow updates, despite my query being covered by indexes. My query is: query = {'spot': df_youtube['spot'].values[key], 'segment': ...
0
votes
0answers
42 views

How to merge numerous collections within one colection in MongoDB?

Here is the scenario: In one collection name is "Parent" I have the following document {"_id" : ObjectId("4f7ee46e08403d063ab0b4f9"), "name" : "MongoDB", "range" : "spec", "notes" : { { ...
0
votes
1answer
1k views

Date range query for past 24 hour in Mongo shell

I am setting a cron job to collect results from MongoDB database profiler. I'd like to collect results within a 24 hrs period. I plan to run mongo command with javascript. Question is, in Mongo ...
0
votes
3answers
133 views

Query MongoDB Collection Compression Settings?

How can i query the settings for collection compression in MongoDB? I configured WiredTiger as storage engine and as collection compression the zlib algorithm. Here is a snippet of my configuration ...
1
vote
1answer
237 views

executing shell (bash) commands from within the mongo client

How can I execute shell (bash) commands from within the MongoDB client? With MySQL client: system (!) Execute a system shell command. Is there something similar for MongoDB?
0
votes
1answer
53 views

MongoDB 3.0 Indexes maximum limitation

I have a mongo DB that store user's public messages. Each message should be categorized by at least one TAG (3 max in an array) The TAG can be anything up to 32 characters. ([0..9a..z]) the Tag ...
1
vote
1answer
121 views

MongoDB: movechunk failed after adding a new share to cluster

I have a MongoDB cluster version 2.6.8, which already has two shares: share1 and share2. When I add a new share3 to the cluster, data chunk can't migrate to share3. This is from the mongos log: ...
0
votes
0answers
49 views

mysql - suggestions for table design with huge number of columns [duplicate]

We have a table that consists of a huge number of columns (usually between 500 to 1000, depends on our clients websites). We are suffering from speed issues due to this, and we're looking for the best ...
0
votes
1answer
91 views

MongoDB to MySQL Replication Automatically

i have Mongodb server and mysql server. i want to use mongodb for "write" and mysql for "read". so i am looking for some tool or some process by which we can tranfer mongodb to mysql server on ...
1
vote
1answer
225 views

How can I be sure if MongoDB is doing the balance?

I have the following structure: Two Ubuntu 14.04.2, both with MongoDB v3.0.4 instaled. Both in the same LAN. I want to make them work as a cluster. In the first one, that I call "MC1", I run the ...
2
votes
2answers
114 views

Sizing a MongoDB shard?

I am in the process of planning a MongoDB deployment, this will be my first to production and I have a question regarding the disk size of each shard in a cluster. This cluster itself will be for ...
0
votes
1answer
630 views

Mongo Create a user as admin for any database raise an error

I am trying to create a simple user with the rights permission to access to any database and can do any actions. When I trying to execute the createUser command I got this error: db.createUser({ ...
0
votes
2answers
29 views

Mongo DB Replica set - not able to read also

We have deployed mongodb replica set: mongod --port 27017 --dbpath /opt/eltropy/mongodb/data/rs0-1 --replSet rs0 --smallfiles --oplogSize 128 mongod --port 27018 --dbpath ...
0
votes
1answer
393 views

MongoDB MMS replica set fails to restart

I have a MMS replica set deployed with 3 instances. It was working fine until I shut it down this morning in order to do some changes and restarted it. From logs, it feels that there was an unclean ...
0
votes
0answers
35 views

MongoDB: Multiple timezone support

In Mongodb how to support multiple timezones? Say every client has his own timezone. I want to group by dates. Records are in different timezones before aggregation. The report should be aggregated ...