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

learn more… | top users | synonyms

0
votes
1answer
152 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
0answers
5 views

GridFs size limitations [on hold]

Recently my team published a service that saves documents in Gridfs. After a few weeks, we already reached 6gb and we are unable to delete old files. My question is if i have to be worried about ...
0
votes
1answer
51 views

What is the syntax of mongodump and mongorestore?

I have a problem in my exercise: Export the db atelier. For that, use the command ./mongodump -d atelier My answwer : $ mongodump -d atelier Import the contenu of the db atelier in the db atelier2. ...
1
vote
1answer
18 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 ...
0
votes
1answer
26 views

MongoDB Update specific entries in an array

{ "_id" : "abcd", "arrayItems" : [ { "name" : "Peter", "age" : 23, "profession" : "Student" }, { "name" : "Paul", ...
1
vote
0answers
10 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: ...
1
vote
1answer
811 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: { ...
3
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 ...
0
votes
0answers
9 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" }], ...
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
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 ...
1
vote
0answers
18 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
1answer
29 views

Is it possible which documents couldn't be dumped using “mongodump”?

I am removing historical data from a collection in MongoDB (3.2), but first I need a backup of it. The choice has fallen, a simple combination of: mongodump --db myDatabase --collection myCollection ...
0
votes
0answers
12 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
2answers
2k views

Write a query which add two fields of a document and compare their sum to third field in mongo

I have one document, say: { "_id" : ObjectId("538b7128cf16e3ea5a1ab23c"), "pgDownloadTime" : NumberLong(9776), "pgAccessTime" : NumberLong("1401647400058"), "...
2
votes
1answer
133 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 ...
0
votes
1answer
163 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 ...
3
votes
1answer
40 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 ...
1
vote
1answer
128 views

How to efficiently design MongoDB database for Uber-like application?

I'm designing a MongoDB database for an Uber-like application, but since I'm new to NoSQL concept, I have several doubts. I have three main collections - users, requests and messages. User can post a ...
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,...
1
vote
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({ user:...
3
votes
1answer
3k views

Query elemMatch Date

I have a document structure like this: { "_id" : ObjectId("5359816b036493327d7cae95"), "_class" : "com.myproject.MyObjectDTO", "signals" : [ { "signalType" : "ABC", "quantity" : ...
0
votes
1answer
12 views

Understanding MongoDB's contra-indications for read preferences

I'm very new to MongoDB and am reading the manual to familiarize myself with it. Would appreciate some help in understanding some points related to read preferences. In general, do not use ...
0
votes
1answer
14 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
12 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
1answer
30 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, ...
1
vote
1answer
189 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 ...
1
vote
1answer
260 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 ...
0
votes
1answer
112 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 ...
3
votes
1answer
517 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
1answer
205 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
676 views

Long running query on replica worker set in mongo

Hi I updated my mongo version from 2.4.to 2.6. Now when i see current op in mongos it shows me some queries which are running for long long time. one example is { "opid" : "...
1
vote
0answers
43 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
269 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 *...
1
vote
2answers
33 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 ...
4
votes
1answer
36 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 ...
3
votes
2answers
29 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 ...
0
votes
1answer
146 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
40 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 ...
2
votes
1answer
395 views

Mongo replication lag slowly increasing

I am running a replica-set in production with slaveOk = false using mongo 2.0.7 in AWS The replication lag on one of the servers is close to 58 hours. This replication lag is sometimes decreasing ( at ...
0
votes
0answers
35 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 ...
6
votes
0answers
264 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 ...
3
votes
4answers
4k views

Why is Mongo stuck in STARTUP2?

I have a Mongo replica set with a few secondaries. A box, which hosts a secondary instance, crashed and lost the database. I started the secondary Mongo instance again and now it's stuck in STARTUP2 ...
0
votes
1answer
132 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 -...
0
votes
1answer
123 views

MongoDB won't start with access control turned on

Hello I would appreciate any suggestions, I have a 3 member MongoDB replica set setup on CentOS I'm trying to configure wit access control: node1, node2, arbiter, When I do not configure security ...
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 ...
1
vote
1answer
908 views

WiredTiger - “too many open files error” during resync of a secondary replica set member

I'm upgrading a secondary replica set member to wiredTiger. I have upgraded it from MongoDB 2.6.3 to 3.0.4 and changed the storage engine to wiredTiger. Now it is resyncing all data from the primary. ...
0
votes
1answer
335 views

Data Analysis with MongoDB or MySQL

I have a need for processing some data in order to come up with some statistic. This is the scenario: Each user can answer several questions from the question list. They pick their answers from a ...
1
vote
0answers
28 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 ...
2
votes
1answer
191 views

cnames for mongo config server

I am seeing this line in many mongoDB links Use CNAMEs to identify your config servers to the cluster so that you can rename and renumber your config servers without downtime I need some help ...