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

learn more… | top users | synonyms

1
vote
0answers
10 views

Replication prioroty

I have two MongoDB instances running on two servers (instance1 and instance2) and they are configured as a replica set. Instance1 is the primary and instance2 is the secondary. When instance1 was ...
0
votes
0answers
13 views

Design: Available domain database

I'm building website and service that will allow user to check if given domain is available. Right now I'm thinking about good way to store result from whois, but i dont want to store whole response ...
0
votes
0answers
12 views

MongoDB duplicate “_id ” for an array “_id”

Consider db "test" in my standalone mongodb instance. I created a collection called testCol and inserted a document with the following syntax : db.testCol.insert({_id:{"age":22,"empId":1},"DOJ":"...
0
votes
0answers
14 views

MongoDB - multiple harddisk failure [on hold]

I have been running a MongoDB instance in a VM for the past three years. During the course, my server hard disk has failed 4 times and I have to replace it with a new one and restore the data. While ...
0
votes
1answer
8 views

getIndexes is not a function on mongo shell

I'm trying to get the index of a collection. > db.version() 3.2.6 > db.getCollectionNames() [ "last_aggregated_stat_ids", "mapps", "stats", "system.indexes" ] > db.mapps.getIndexes() [ ...
-4
votes
0answers
38 views

Retrieving the data based on id from table contains 2 million rows [closed]

I have one table/collection contains 2 million rows/document (id(20 alphanumerical digits), name, ... etc). From that table I want to retrieve data based on the id within 1 sec Which database ...
0
votes
0answers
16 views

MongoDB gets corrupted after docker container restart (WT_NOTFOUND)

Sometimes, with no particular explicit reason, MongoDB gives me this error: [initandlisten] Detected data files in /data/db created by the 'wiredTiger' storage engine, so setting the active storage ...
0
votes
0answers
14 views

Cannot connect to a mongos

I am implementing a sharded cluster in a Windows environment. I first create the config server as follows: C:\MongoDB\bin>mongod –configsvr –bind_ip 192.168.1.4 –port 3000 –dbpath C:\Sharding\...
1
vote
0answers
34 views

How to improve performance of this aggregate query?

I have the following tables in MongoDB: Users table (count 200+ users): { "_id" : ObjectId("56dd6204ce47a3c44d8b4567"), "u_role" : "1", "u_fname" : "dsfsd", "u_lname" : "dsfdsf", "u_email" : "dsfds@...
0
votes
0answers
20 views

MongoDB or ElasticSearch

Which one of them is good to use? I'm developing a application which will have the following functionalities. Multiple users Each user will have their own database Data objects will be different; ...
0
votes
0answers
56 views

mongs failed to findone when collection is under sharding migration

I have a collection which enabled sharding on 2 replica sets, rs01 and rs02. I added a new replica set rs03, it started to migrating chunks to rs03 slowly(it only migrated about 300 chunks in 4 days......
0
votes
0answers
9 views

Mongodb, high disk write volume

On my developer machine (iMac) I was running mongodb locally and experienced high disk activity - 50-70MB/s writes. I found out the activity came from Mongodb, but I was not doing anything other than ...
0
votes
0answers
21 views

Mongo DB services went down while creating indexes in >300GB Mongo database instance

While creating index for a collection in Mongo DB instance.Mongo DB services went down with below error. kindly help on how to overcome the same.For smaller database instances it went fine. Command ...
0
votes
0answers
27 views

Can one database affect the performance of another in MongoDB?

We have a fairly beefy server (15 GB RAM, 2 cores) running a reasonably large MongoDB instance. The Mongo instance hosts two separate databases that communicate via application code. The larger ...
0
votes
0answers
14 views

Migrating an active production sharded MongoDB 2.6 environment

We're currently considering migrating our live production MongoDB (2.6) environment (18 shards with replica sets, around 600GB of data, hosted service with very little user permissions) to a different ...
0
votes
1answer
21 views

Standalone Backup and Restore Tools

We plan to have our build server perform a backup (mongodump) from our Production environment and restore it (mongorestore) to the Test environment for each new release to Test. Are there mongodump ...
0
votes
0answers
28 views

MongoDB avoid $sort + $limit optimization

In my Django app using mongoengine I've got such code: art_cursor = Articles.objects.aggregate({'$match': {'ntype': {'$in': [1,6]}}}, {'$group': {'_id': {'title': '$title'}}}, {'$sort': {'_id....
0
votes
1answer
18 views

MongoDB cannot be started after moving the server

I had a happy MongoDB 3.0.5 installed on a VM on a Windows 2012R2 Server, for light use. I moved the VM to a new physical server without any major changes, and to my surprise it cannot be started; and ...
0
votes
1answer
27 views

MongoDB insertion in two collections or one to improve insertion speed

I have a collection, in which I have too many records (~300 million). And the insertion rate is also very high and it takes time to insert documents, which is my main problem. As I have two types of ...
0
votes
1answer
13 views

What would be better long term: Creating many documents in MongoDB or fewer documents with nested arrays

I have a scenario I'm debating for my app. Let's say I have a Quiz application with a MongoDB structure that looks like this: { _id: xxxxxx, userId: xxxx, quizData: [ { name: xxxx, quizId: xxxx, ...
1
vote
1answer
16 views

MongoDB Sharded Cluster: Balancing chunks not working, stuck at “step 2”

I've one collection enable sharding by id key on 2 shard rs01 and rs02 Today I added a new shard rs03 into cluster. I've checked balancer status by sh.status() as below: shards: { "_id" : "rs01"...
0
votes
1answer
38 views

what shortcomings does couchbase have, compared to mongodb? [closed]

I see a massive gap of popularity between MongoDB and Couchbase. What features\advantages does mongo have over couchbase? I'm deploying DB instances in a cluster, between datacenters, where all ...
0
votes
1answer
21 views

Mongo query hangs for a long time when creating indexing on a field

We are migrating our single Mongo instance to Mongo cluster with sharding. I haven't started sharding yet. However, I found out when I try to add an index from , I can't query any collection anymore. ...
0
votes
0answers
14 views

MongoDB: migrate Replica set in a sharded cluster to new servers

I have sharded cluster with 4 shards (4 replica sets). I need to migrate one shard to a new set of servers. Can i Just add the new servers to the replica set and remove the old servers? Mongo version ...
0
votes
1answer
33 views

MongoDB/Mongochef: import from JSON changed dates to string

I have a huge JSON file (about 5 GB) with several fields in all rows. this is what one document looks like: { "_id" : ObjectId("55f0105346c5110dfc6b8760"), "patient" : "198", "concept" ...
1
vote
1answer
23 views

Change logging level MongoDB

We are experiencing huge logs creation in our MongoDB shard setup. Log settings used are default values - firstset:PRIMARY> db.getLogComponents() { "verbosity" : 0, "accessControl" :...
1
vote
1answer
25 views

task eats 100% cpu on Mongodb

I got app server with MongoDB installed. Every 3 hours I run some nodejs script that updates data, and my server consumes 100% CPU and becomes slow. Is there any way to improve that? Can I create ...
1
vote
1answer
27 views

Mongodb performance: compound query vs moving to other collection

My application uses mongodb to store order information. At some point orders are sent after which I need to generate some reporting of all orders in a timerange. To give an idea of my order document: ...
0
votes
0answers
14 views

update an embeded document of embeded document in mongodb

I am not able to update an emdeded document which is in another embeded document. the document is like: {_id:1, address:[{ _id:"addressFields", currentAddress:[{ _id:"1", city:"canada" }], ...
1
vote
0answers
45 views

Progress of mongodump operation jams at a random point

We are executing remote mongodumps to backup collections. For some time now sporadically one of these dumps stops to progress any further and remains to log out the same amount of documents processed ...
0
votes
0answers
25 views

Mongodb mmap private failed with out of memory

I am getting following error while tying to do write (from java) operation in mongodb 2016-06-26T18:11:46.426-0700 E CONTROL [conn2] mmap private failed with out of memory. (64 bit build) 2016-06-...
0
votes
1answer
27 views

MongoDB Update specific entries in an array

{ "_id" : "abcd", "arrayItems" : [ { "name" : "Peter", "age" : 23, "profession" : "Student" }, { "name" : "Paul", ...
3
votes
1answer
53 views

Sharding Balancer and long running query problem

I have problem on my Sharding. There are a couple of long running queries observed, running for more than 3 hours. My question is, are the below things interrelated? What is the issue? How do I fix ...
0
votes
1answer
21 views

Compound shard key with _id field

I have documents like: {_id: "someid1", "bar": "somevaluebar1"} {_id: "someid2", "foo": "somevaluefoo2", "bar": "somevaluebar2"} {_id: "someid3", "foo": "somevaluefoo3", "zoo": "somevaluezoo3"} {_id: ...
0
votes
0answers
15 views

MongoDB DUPLICATE non-sharded collection was created when running mongoimport on 2 different query routers

I am running multiple mongoimport processes to import a collection lc_data into a mongo cluster. This collection is NOT sharded and its primary server is the shard-01 server. mongos> db.lc_data....
1
vote
0answers
44 views

MongoDB insert not replicating after db.dropDatabase()

I'm new to MongoDB (inherited a project using it), so this is especially confusing. I have a sharded replicaset between 3 ec2 instances. Everything works fine until I drop a database. The database ...
0
votes
1answer
42 views

Hierarchial, tree-like data model, which DB type? [closed]

I have the need for a database, I know what to store, however the question is what database to use and why. I have used relation SQL databases a lot in the past (up to a few years ago) and I know I ...
0
votes
0answers
55 views

MongoDB out of memory error

In our MongoDB sharded cluster, one of our shards consists of a mongo replica set (1 Primary + 1 Secondary + 1 arbiter) running on a single IBM Power Linux Server. Yesterday inserts to one db on this ...
3
votes
2answers
34 views

What is the difference between mongod in standalone vs replica set

I've been running Mongodb as a replica set on 3 servers (primary, secondary and arbiter) but because I have to downscale I'm converting the primary to a standalone server. Before this change the ...
1
vote
0answers
52 views

Mongos process memory usage and crashes

So our MongoS instances use up A LOT of memory. More than even the shards and sometimes crash because of it. Cluster structure 3x mongos 3x mongod Shards 3x mongod Replicas (one for each shard) 3x ...
3
votes
1answer
32 views

MongoDB: Can I have a delayed secondary that doesn't vote?

I have a replica set setup with 1 Primary, 1 Secondary and 1 Arbiter; each on a different data center. I want to add a delayed secondary to one of the existing data centers, but I don't want it to ...
4
votes
1answer
37 views

What is the best way to reload data in MongoDB

I am benchmarking MongoDB using YCSB framework using the latest drivers. During the benchmark, I change the cluster setup (adding/removing shards) extensively and delete/insert workloads in the order ...
1
vote
0answers
39 views

Replacing a member of a replica set with the same host name

I am replacing a member of a replica set (the new member has a different IP address). What I am looking to do is as follows: RSYNC the data directory of the existing secondary node to the new node. ...
0
votes
0answers
23 views

mongodb "slave to change to Replica set“

I passed the master slave relationship, and then I would like to start from a replica set, this way to change the version of mongodb, so it is feasible? master 2.6 slave 3.2 slave replica set ...
1
vote
2answers
39 views

MongoDB aaS - administrate volumes/disk size - consequences of full volume - new file allocation failure

We run MongoDB (currently 3.0.6) as a Service. MongoDB is running inside Docker Container with a small volume 8 GB where mongod data files are stored permanent. The volume can't be extended. This is ...
1
vote
1answer
108 views

Error 13141 in mongos shell while trying to write to a result of the mapReduce invocation to a sharded collection

In our db init script, we have the following lines: var conn = new Mongo(); var admin = conn.getDB("admin"); var db = conn.getDB("foodb"); admin.runCommand({ "enableSharding": "foodb" }); // ... db....
0
votes
1answer
38 views

How to find all records in mongo db whoese primary key is a user defined character string

I would like to know the command to find all records in mongo db whose primary key(_id) is a user defined character string. Or Find all records where all primary keys(_id) are not 12-byte BSON type. ...
0
votes
0answers
42 views

Mongo Schema for large time series data sets

I'm not a DBA but a C# developer, my experience so far is with MS SQL, so please keep that in mind. I am trying to design a scheme to store sensor data and have it organized. Each TestRecord would ...
0
votes
1answer
60 views

mongodb compact does nothing - no entry in mongodb.log and nothing in db.currentOp()

We have space problems. The actual data size is only 5 GB, but disk size is 15 GB because of deleted documents. MongoDB (3.0.6) runs in docker container where we can't extend volume. # tail -f mongod....
0
votes
1answer
31 views

MongoDB ixscan seems to be scanning more objects than expected

I'm using MongoDB 2.6.12 and a collection has the following index {a: 1, d: -1}. In case the types matter a is a Number and d is a Timestamp. From what I can see in the code we are limiting this ...