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

learn more… | top users | synonyms

3
votes
1answer
49 views

Does it make sense to limit Mongo RAM?

I have a Windows server running MongoDB. My database has big indexes and all RAM is usually busy. As I know, it can be a cause of Windows swapping and performance issues. Does it make sense to limit ...
-2
votes
1answer
93 views

Why are writes failing in MongoDB?

Here is the information about my development environment: Microsoft Visual Studio Community 2015 .NET Framework 4.6 ASP.NET MVC assembly System.Web.Mvc Version=5.2.3.0 MongoDB.Driver 2.0.1.27 ...
0
votes
1answer
159 views

Why does MongoDB give me the cannot use 'w' > 1 when a host is not replicated Error message?

Here is the information about my development environment: •Microsoft Visual Studio Community 2015 •.NET Framework 4.6 •ASP.NET MVC assembly System.Web.Mvc Version=5.2.3.0 •MongoDB.Driver 2.0.1.27 •...
1
vote
0answers
51 views

Identify a blocking process in MongoDB

I have a single MongoDB instance is performing quite badly. I noticed that db.currentOP().inprog.length quite often becomes quite big, sometimes even goes up to 100. When I drill down to the actual ...
0
votes
1answer
926 views

MongoDB replica set configuration error

I am trying to set up a MongoDB replica set on Digital Ocean. I edited /etc/mongo.conf and specified replica set id: replSet=rs1 and did not change anything else. I did rs.initiate() on the first ...
1
vote
1answer
50 views

MongoDB schema for a news service

I would like to create a mongoDB database that would be very similar to how various news services store and display their data. The database would be queried by an android phone. Lets have a look at ...
3
votes
2answers
263 views

When is the _id index used?

When is the _id index used by MongoDB? I could not find anything specific about it in Index Introduction, Analyze Query Performance, and Query Plans. When sorting by _id at the end of the query via ....
0
votes
1answer
161 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, ...
0
votes
1answer
103 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
104 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
82 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
146 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 (...
1
vote
1answer
38 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
72 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
202 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 http:/...
0
votes
1answer
20 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
114 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
95 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 type:...
1
vote
2answers
147 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 "printjson(rs.status().members.map(...
0
votes
1answer
149 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
1k 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
211 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
38 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: "hydra.user_short_message-...
0
votes
0answers
35 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
16 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
216 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
30 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
86 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 ...
3
votes
1answer
8k 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
387 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
173 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
95 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 ...
2
votes
1answer
65 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 ...
1
vote
2answers
617 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
68 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
66 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
39 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
25 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
84 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
446 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
80 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
104 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': df_youtube[...
0
votes
0answers
79 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
6k 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 shell,...
2
votes
1answer
371 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
515 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
97 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
292 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
52 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 ...
1
vote
1answer
258 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 ...