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

learn more… | top users | synonyms

1
vote
1answer
67 views

Is any way to restructure MongoDB?

I have a MongoDB with compound index by 4 fields and I want to reorder physical data distribution at HDD by this index. I am looking for something like creating chunk in NOT sharded environment. Is ...
0
votes
0answers
233 views

Configure Mongo to close idle connections

I want to know if there's something that can be configured on the Mongo server (mongod) to close idle connections. The scenario is this, we've some node clients that open a connection, when the ...
0
votes
2answers
68 views

Mongodb monitoring

I am using a mongodb in my application and i would like to ask if someone here has some tested tools to monitor the servers (similar to tools like heidi sql or mysql workbench). My main needs are ...
0
votes
0answers
730 views

Issues in starting MongoDB service

I've installed MongoDB 3.0 in RHEL 6. From root user, i'm trying to start the mongo service but it is getting failed and the log file is not getting updated as well.. 2015-10-13T09:53:26.133+0530 ...
0
votes
0answers
35 views

MongoDB Update If… Else… Statement

So I'm trying to run an update operation that includes a few conditions but I'm unsure of the correct syntax to use. For example, if field name "status" equals "some value", then change the value to ...
0
votes
0answers
13 views

how to authenticate user added to the router on the shards added in that router in mongodb sharded cluster set up

I have added the user in the admin database of the router(mongos) and then generated the key file and shared it across all component that is config server and the replica which need to be added in the ...
1
vote
1answer
160 views

How do long string field names affect MongoDB database size?

I am using MongoDB and the names of my fields are strings with 10-20 characters. A typical document consists of 30.000 columns filled mostly with floats, like 1.2, 10.5, 2.55. It's size is 1MB. Do ...
1
vote
0answers
45 views

Is there a way of implementing a composite primary key with varying fields in MongoDB?

Here is the information about my development environment: -Mongodb 3.0.0 -Microsoft Visual Studio Professional 2013 -.NET Framework 4.5 We are trying to design some MongoDB collections at work ...
0
votes
1answer
44 views

How indexing on a date field that is constantly updated and or omitted affect performance?

In mongo, I have a collection with a date field called last_updated I would like to index. Reason being, I am often querying on a date range of that field, in addition to sorting by that field. I ...
0
votes
1answer
188 views

Mongo error : Could not lock auth data update lock. on root user

i have a mongodb on 2.6.9. my connected user is root: mongo --username myadmin --password thepassword --port 27018 --host 127.0.0.1 admin MongoDB shell version: 2.6.9 connecting to: ...
0
votes
1answer
37 views

How set balancing as main task for sharder MongoDB cluster?

I have a big collection (over 400 millions records) which I want to divided between 4 shards. I created infrastructure (4 shards, config server, mongos) and all work well (balancer is working and data ...
1
vote
0answers
106 views

MongoDB very poor query performance vs Oracle

I'm a MongoDB noob and trying to import data from an Oracle table. My Oracle table has 1 unique index on a single column, which is an id (a number - primary key). I successfuly imported data to ...
0
votes
0answers
36 views

MongoDB: poor compression rates

I'm importing a small set of data from Oracle in MongoDB. Basically, I have a table which is about 1Gb in Oracle (avg_row_len x nb. rows, i'm not counting the index sizes. Though data is compressed). ...
0
votes
1answer
86 views

MongoDB Unrecoverable Failure

My machine (OSX) had a power failure and when restarted, I have one db in Mongo that is completely unrecoverable. I am using the db per directory with dbpath and logpath specified options and was able ...
1
vote
2answers
61 views

MongoDB automatic failover between 2 data centers

If I deploy a MongoDb replica set across only 2 data centers, if one entire data center fails, can there be automatic failover to the other data center? Consider the situation where 1 data center has ...
0
votes
1answer
25 views

How to remove blockages in MongoDB when multiple write query comes for same collection at same time

I want to use MongoDB in a clustered environment with 3 shards and make each shard replicated. MongoDB is a single threaded so when multiple requests hit shard 1 to insert or edit one collection at a ...
0
votes
1answer
77 views

cannot repair database in mongodb

I accidentally deleted 2 data (mydb.47, mydb.62) files from my /data/db of my mongodb. I have rest of the files in place... Now my mongodb won't start up..I tried repairing it using this command ...
0
votes
0answers
30 views

convert mongo standalone to replicaset in docker

I've a Docker instance with mongo. This run as standalone configuration. Now I would to change entrypoint.sh to run itself as replica set following official guide standalone to replica set Any ...
1
vote
1answer
90 views

Measuring MongoDB I/O and CPU performance

I am new to MongoDB and I'm experiencing this NoSQL db through a series of very simple queries, with an Oracle exported data set. Aside measuring the execution time with primitives like ...
0
votes
0answers
61 views

MongoDB: Change block_compressor for existing collection

I have a server running with wiredTiger storage engine, but without compression enabled globally. Now I want to change the "block_compressor" option for a single collection to use "snappy". According ...
1
vote
1answer
76 views

Ideal database to store/query data submitted through dynamic user created forms

I am designing a web application that allows administrators to create public facing forms. The fields that can be included in the forms are anything from text fields to radio buttons. I need a ...
1
vote
1answer
24 views

Export and Import MongoDB?

I come from a bash and mysql environment. I'm trying to get use to mongodb. I see there are different ways to export and import mongodbs. Does anyone know the bash and mongodb equivalent of ...
0
votes
3answers
2k views

mongoimport error - Failed: error connecting to db server: no reachable servers

I am currently trying to learn mongodb and I am having trouble finding a solution for this problem. When I run a mongoimport command it I get the following error: ~ mongoimport --host localhost ...
0
votes
0answers
38 views

design of schema in mongoDB

I'm using mongoDB as my database. i have an record of 100 hospitals. To store all the information i'm designing schema of my database for that i've three solutions: i can create collection for each ...
0
votes
0answers
12 views

impact on Nodejs app - Disable Server-Side Execution of JavaScript --noscripting

What does the startup option --noscripting do exactly? What is the impact on a Nodejs app? What does not work anymore if we Disable Server-Side Execution of JavaScript? The admin guys are the only ...
1
vote
1answer
54 views

mongodump replicaset - 10 hours data loss acceptable - do we need --oplog (oplog.bson) option?

We have a 3 node replica set. We take backups from secondary with mongodump. Our customer said that it's ok too loose 10 hours of data in worst case. So we decided we don't need point in time ...
1
vote
0answers
27 views

what is getmore / cursor batch

In MongoDB world you see often getmore. For example in mongostat. What is that exactly? What would be the analogous term for MySQL/MariaDB or Oracle RDBMS?
3
votes
1answer
48 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
89 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
138 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
42 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
746 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
45 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
213 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
144 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
86 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
96 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
78 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
118 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
35 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
63 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
181 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
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
96 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
89 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
126 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
132 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
922 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
192 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
37 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: ...