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

learn more… | top users | synonyms

0
votes
0answers
3 views

MongoDB performance decreases over repeated requests

I have a Node.JS app that basically requests updates from MongoDB every 100 millis after the previous request was completed. Both my Node.JS app (very lightweight) and my MongoDB database are on the ...
1
vote
1answer
28 views

Is findOne() in mongoDB deprecated

Is findOne() in MongoDB deprecated? I am asking this because when I use findOne() in WebStorm the IDE puts a line through findOne() and gives a message saying findOne() is deprecated and to find ...
1
vote
1answer
17 views

Security on MongoDB

I have been reading up on the security of MongoDB. If my web app lives on the same server as the DB, can I just set the bindIP to 127.0.0.1? I'm not sure what the best practices are, but this should ...
1
vote
1answer
769 views

How to update a field in sharded environment in mongodb using C# driver

I have successfully done loading in sharded environment. It is working fine. But when I do update in sharded environment, I am getting the error as : WriteConcern detected an error 'update { q: { ...
2
votes
2answers
1k views

Secondary and Arbiter stuck in Startup

I'm using MongoDB version 3.0.0. I'm trying to setup mongodb replication on our machine. Replication was initially setup but due to some changes on the VM the entire thing crashed. When I tried to set ...
0
votes
1answer
147 views

Converting sql into mongodb nosql

I am trying to convert oracle sql into its mongodb equivalent version. create table my_hll as select mod(ora_hash(n), 1024) bucket, max(num_zeroes(trunc(ora_hash(n)/1024)))+1 val from previous_data ...
0
votes
1answer
224 views

mongodb could not find host matching read preference { mode: \“primary\” } for set?

I am deploy a monodb sharding, I have deploy a replica set in three machines: dev41:27017,dev42:27017,dev193:27017 and configsvr in three machine: dev41:27019,dev42:27019,dev193:27019 and also a ...
3
votes
1answer
2k views

verify that mongos server is connected to config servers

I've been writing a backup script for sharded replica-sets and it's almost done, except that I can't seem to get it to successfully start the balancer back up after everything's all said and done. ...
0
votes
0answers
5 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
0answers
6 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 ...
0
votes
0answers
5 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 ...
0
votes
1answer
10 views

Delete document from nested array in mongodb

I've created a collection with following insert statement db.test.insert({ "_id": 1, "updatedAt": ISODate("2016-05-27T05:37:44.928Z"), "created_at": ISODate("2016-05-13T09:41:23.000Z"), "batchId": ...
0
votes
2answers
27 views

MongoDB skipping 20 documents when storing in a variable

ids = db.students.find({}, { _id: 1 }); It gives the length of ids as 2993 while students count is 2413. It's not storing the 20 documents which are being displayed on the shell.
1
vote
0answers
10 views

Operational issue for scheduling mongodump as backup method

For production backup, MongoDB recommends mongodump instead of mongoexport for accuracy of data. However, a few operational issue remain unclear to me, appreciate if anyone can advise on this matter. ...
3
votes
2answers
20 views

MongoDB not using all memory in Windows server

I have a stand-alone MongoDB instance running in windows. It's recently experiencing slowness and my troubleshooting has found the following symptoms. The slowness normally occurs after a full text ...
0
votes
1answer
110 views

Dump first N documents of a collection with mongodump

I am very new to MongoDB and I would like to know how to dump the first N elements of a collection with mongodump. I can't figure out the query I have to use. And how would you dump the last N ...
0
votes
1answer
3k views

Storing multidimensional array in MongoDB

I am attempting to convert a large MySQL database of product information (dimensions, specifications, etc) to MongoDB for flexibility and to move away from the restriction of a column based table. I ...
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 ...
0
votes
0answers
16 views

MongoDB GUI suggestions [on hold]

I am searching for a mongodb GUI client to use that allows me to store PDFs, doc, XL files and have the ability to pull up or view the files from the client. Is there any client out there that has ...
0
votes
3answers
659 views

Can we have more than one arbiter in monogodb replica set

I am setting up cluster of my webserver which uses mongodb. I am doing replica set of mongodb.I have only two machines. So can I have two arbiters in replica set ?
2
votes
1answer
1k views

MongoDB all replica set members are “OTHER”?

I am setting up a MongoDB replica set using EC2's image: https://aws.amazon.com/marketplace/pp/B00CO7AVMY/ref=dtl_recsim_B007IBMJPI_B00CO7AVMY_3 MongoDB version 2.6.5 I have managed to set up ...
1
vote
0answers
13 views

Too many open connections with MongoDB 2.6 + PyMongo 2.7.2

I was running MongoDB 2.4 with a replica set which contains 1 primary, 1 secondary and an arbiter. We were using PyMongo 2.6 and MongoEngine 0.8.2. Recently, we performed an upgrade to MongoDB 2.6, ...
3
votes
2answers
5k views

Mongo replicated shard member not able to recover, stuck in STARTUP2 mode

I have following setup for a sharded replica set in Amazon VPC: mongo1: 8G RAM Duo core (Primary) mongo2: 8G RAM Duo core (Secondary) mongo3: 4G RAM (Arbiter) Mongo1 is the primary ...
0
votes
0answers
8 views

Mongodb - save image as bytes or as files

I'm developing a website which allows the user to upload an image per item. I guess there will be hundreds per user. What is more preferred? Save the images: as bytes in the DB (mongodb) as ...
2
votes
1answer
119 views

Add new shard - always best?

In our setup, we currently have 3 shard set sharded cluster, each shard being a replica set of 3. Our writes are about to go up significantly to implement a new feature, and we know the extra data ...
3
votes
0answers
24 views

How to assign 'findandmodify' privilege to a mongo user?

I'm running a Mongo 2.6 replica instance where a node application needs to talk to. Basically nothing much was setup except these parameters: # where to write logging data. systemLog: destination: ...
0
votes
1answer
2k 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({ ...
5
votes
0answers
218 views

Sudden Mongodb high connections/queues, db stops responding

The issue We have a strange issue on our mongodb setup. Sometimes we get peaks of high connections and high queues and the mongodb process stops responding if we let the queues and connections ...
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 ...
3
votes
1answer
43 views

replica set in MongoDB using docker, primary has error and stops being primary when another member is added to the set

I have two docker containers running a mongo instance each, they were initialized like this: docker run --name mongodb-shard-1-node-1 -d -v mongodb-shard-1-node-1:/data/db -p 27031:27017 mongo ...
2
votes
2answers
1k views

How to setup a MongoDB replica set for the connector

I want to keep MongoDB and Solr in sync. The mongodb-connector (python) is the tool I want to use to do that. Now a replica set in mongodb is required (see ReadMe), but I don't want (and can) setup a ...
1
vote
1answer
223 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
17 views

Syncing data from primary member to secondary after election

Maybe this is kind a stupid question but, I'm novice in configuring replication and I need to clear something before makeing anything else. Moment ago I configured replica set with 3 members in it. ...
3
votes
1answer
500 views

MongoDB text index and text search

I have a mongodb collection db.articles,it has 2 keys ,"title" and "abstract".I want to do text search on these two keys.For example, the search text is "physics",and I want all the documents whose ...
0
votes
0answers
7 views

Ops Manager alert “Host is down” no info in mongodb.log, automation-agent logs and /var/log/messages

We received Host is down alert (Ops Manager - Alert - XXX - 2016-05-18T23:32+0200) I checked mongodb.log on all 3 replica set members. I see only logs about index creation, looks all healthy to me. ...
0
votes
1answer
251 views

While installing Mongodb, getting “enabling http interface” message and stopped

I am getting following error while installing mongodb, $ mongod --directoryperdb --dbpath C:/mongodb/data/db --logpath c:/mongodb/log/ >mongodb.log --logappend --rest 2015-03-17T17:32:55.359+0530 ...
0
votes
1answer
136 views

Does remove document automatically remove the index that reference this document?

I am wondering if removing the document will automatically update the index if this document is referenced?
0
votes
1answer
170 views

MongoDB “overacts” on cleaning/flushing and finally hangs up

Recently I run several times into trouble with mongodb that exhausted my system. The database is tiny, after a mongodump, all files together weight 248KB. After some hours uptime it happens that the ...
0
votes
1answer
107 views

Error while doing in replicaset in windows (mongodb)

I tried doing the replicatset in windows, but im getting the below error. I checked the mongo process and killed the existing process. Even though the error exists. help me on this pls Thx ...
0
votes
1answer
185 views

Client not reading from Mongo secondary database

I've implemented a replica set that I'm using globally. I have my master in Oregon, US and 4 secondaries. California and Virginia, Frankfurt and Sydney. I also have web servers in those same regions ...
0
votes
1answer
116 views

Why mongo write only one partition

The /dev/mapper/vg_db1-lv_root partition used 100%,but the other partition is free,why mongodb store data only use this partition. This is why? How can I solve this problem? [root@db1 shard11]# df ...
5
votes
2answers
134 views

MongoDB vs RDBMS DBA duties

What are the differences between the daily tasks/duties of a Mongo DBA compared to a RDBMS DBA? For example, some sites claim that a MongoDB DBA would not require to do data modelling or designing ...
1
vote
2answers
23 views

Redundant mirroring of two mongodb servers

I have built a laravel web application for a client of mine which runs on a dedicated server. The system is a booking system, and the client needs access to this at any time during the work day. So ...
0
votes
1answer
27 views

MongoDB 'too many indexes' problem

I've got a problem, when I got 6 fields and have no subset of fields, which my app always uses. That means that all of my queries always have different set of fields to scan. Then I read a little old ...
1
vote
3answers
47 views

What is considered as a document in mongoDB?

I have been learning MongoDB for the past two days and I've been confused with documents and their limits, and how to overcome the limits. What is a difference between documents and collection?
1
vote
1answer
42 views

MongoDB cluster deployment

I am new to MongoDB. I am trying to deploy a MongoDB cluster. I am following: https://docs.mongodb.org/manual/tutorial/deploy-shard-cluster/ I initiated Config Server Replica Set and after that I ...
1
vote
0answers
20 views

Mongo is slow when the IOPS reaches 50%

We have an AWS-r3.large system. With 1.5TB data volume dedicated to Mongo. We are still using 2.6.3 (yes, upgrade pending for a while now). The data size is only 550GB. The volume that we have, has ...
0
votes
1answer
28 views

Mongosniff Error : unknown opcode

*** CANNOT HANDLE TYPE: 2010 10.117.241.104:27017 <<-- 10.117.241.104:51907 hosts 465 bytes id:14429c 1327772 unknown opcode 2011
0
votes
1answer
27 views

Adding secondary via rs.add on MongoDB

I have a master and slave on linux (centOS 7). The rs.initiate(cfg) was done but its shows the below output when trying to add secondary via rs.add. I get this: How do I resolve? Version: The ...
0
votes
0answers
28 views

Mongo crash after 2 seconds of starting

My mongod service crashes within 2-5 seconds of starting. I don't understand why. Here are the systemctl logs: systemctl status mongod.service mongod.service - High-performance, schema-free ...