Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [mongodb]

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

5
votes
0answers
291 views

Performance degradation after upgrade from 3.0.11 to 3.2.12

Environment: CentoOS 6 (kernel 2.6.32), MongoDB community edition 3.0.11 and 3.2.12 , storage engine MMAP, config servers on SCCC We are experiencing performance degradation when moving from 3.0.11 ...
5
votes
0answers
865 views

Understanding MongoDB Log warning

In my MongoDB log, I am seeing these lines of messages: 2016-04-05T00:03:42.904+0000 I COMMAND [ftdc] serverStatus was very slow: { after basic: 200, after asserts: 240, after backgroundFlushing: ...
4
votes
0answers
296 views

MongoDB background index builds block secondary

We recently experienced a disruptive incident in a MongoDB 3.2 cluster related to index creation. Scenario: Several indexes were created on the primary using background: true. Indexes were ...
4
votes
0answers
764 views

Primary node of MongoDB ReplicaSet constantly high cpu usage

We use mongo replicaSet version 3.4.2 on our production environments. The replicaSet works with 6 nodes , one primary and 5 secondaries. Few weeks ago we have started to get alerts on high cpu ...
4
votes
0answers
155 views

Performance impact of having Polymorphic collections in MongoDB?

Say one document(Level 1) is supposed to have N(k) different kinds of items as sub-document arrays(Level 2), and these are stored in a separate collection(s?) due to lack of query optimisation for ...
3
votes
0answers
594 views

How to measure the memory usage of a Mongodb aggregation?

I recently started running into the Sort exceeded memory limit of... exception on an aggregation pipeline in MongoDB. I got around this by setting AllowDiskUse=True for the aggregation. However, I ...
3
votes
0answers
54 views

Why are these MongoDB queries using indexes differently?

I've been trying to diagnose some long running queries and whilst profiling them I've noticed some very strange behaviour that I can't explain (pun intended); which I'm hoping someone here can... ...
3
votes
0answers
243 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: ...
3
votes
0answers
521 views

Read replica setting giving error “No candidate servers found”

I am running my website with Laravel 5 + MongoDB. I am using mongo cluster to speed up data read and write, and to lower CPU usage of the mongo server. I have set up the replica like this: 10.0.1....
3
votes
0answers
575 views

How to Shard a Mongodb Collection based on String and Date Time Shard Key using Range Based Sharding

I am new to Mongodb,I have to Shard a Collection Based on Integer, String and Date time shard key, I am able to shard a collection using integer shard key. below is the command,I am using for Range ...
3
votes
0answers
528 views

Very slow MongoDB find query

I am having troubles with this simple query which takes a few minutes. db.data_items.find({'observation_target.observation_target_id': 2190}).limit(20000) The explain output shows that the query ...
3
votes
0answers
468 views

MongoDB user account required for arbiter?

I have a test environment with two mongo v2.6.5 instances (#1, #2) and an arbiter instance in a replica set. I have a a common key file configured for all three instances. I have created an admin ...
3
votes
0answers
2k views

Mongo not using enough RAM, and is slow

Our Production Mongo appears to be behaving weirdly. As far as I have read, Mongo should eat up all the available RAM to cache Index and Data in memory but in our case it is not doing so. Our ...
3
votes
0answers
199 views

automated data sync after Primary node is down

I have this scenario, using version 2.2.2: Node A, Primary, Priority: 10, Wireless network Node B, Secondary, Priority: 9, VM Server1 Node C, Secondary, Priority: 8, VM Server1 Sequence: In Node A, ...
2
votes
0answers
106 views

Mongo Db Update (upsert) taking several seconds

Machine Specs: 12 Cores 64GB Ram Mongo Setup: Mongo Version 4.0.5, XFS file system (Flash SAN backed), 1 replica set with 2 replicas, 10GB network all local (sub 1ms latency) Operation Being ...
2
votes
0answers
42 views

MONGOS uselessly scanning indexed documents when counting on shards

I have a simple collection with 40M documents distributed over 2 shards. The documents contain a field named COUNTRY with a sparse index on it. db.contacts.count({ "COUNTRY": "US" }) I am trying to ...
2
votes
0answers
150 views

Should Azure host write-caching be enabled when using MongoDB's WiredTiger storage engine

I have several virtual machines on Azure running a mongoDB replicaSet with the WiredTiger storage engine. I'm not sure about the proper host caching option to set on the disks that contain the MongoDB ...
2
votes
0answers
571 views

MongoDB GridFS triples the file sizes

I really like using mongodb to store my data and recently I tried out GridFS and it really fits my use case. My problem with it is the space requirement, which seems quite odd. I have ~107GB of ...
2
votes
0answers
177 views

Quickest way to partially restore a mongodb instance from AWS snapshots?

I have multiple large mongodb clusters running mongodb 3.4 configured with wiredtiger. I would like to set up standalone instances with just a few DBs from these clusters, all on the same EC2 instance....
2
votes
0answers
197 views

MongoDB + XFS - Snapshot backups - Cannot shrink XFS filesystem

I am using MongoDB 3.4 (with WiredTiger) with several replica sets and it has been great so far. I want to back up my data using snapshots as per the MongoDB recommendation for production backups. ...
2
votes
0answers
2k views

How to see progress of mongorestore?

Is there any way to get a progress measure or remaining time estimate from mongorestore? I used mongodump to export a compressed archive, which generated an 8GB file in about an hour and showed a ...
2
votes
0answers
83 views

Indexing on object fields within an array that can potentially hold unlimited number of objects in mongodb

In our app, we use mongo to store data for reporting on large number of documents. Here is an example of one of the documents that we currently store in mongo: { "_id": ObjectId("...
2
votes
0answers
115 views

Is MongoDB a good fit to track a stock portfolio?

Is mongoDB or any document database in general a good fit to track a stock portfolio? I have identified 5 main data domains: Portfolios Transactions Holdings Stocks information Stock Prices The ...
2
votes
0answers
324 views

Outer join in MongoDB?

I have a posts collection in the following format: { reqID: Int32 chatID: Int64 messageID: Int32 visits: Int32 } I also have a user collection which has an array field named visits: ...
2
votes
0answers
920 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
0answers
450 views

mongod crashes with “Invariant failure getExtent( a )->xprev.isNull()” message

I am trying to start a mongodb server with the database, that is located on portable drive. I know barely nothing about the internals of this particular database. There are 647 database.N files, 2G ...
2
votes
0answers
160 views

Solr with SQL Server or NoSQL

I am working on a POC of using Solr with SQL Server. I have a very complex data model with SQL server which required a bunch of joining and scalar functions to strip some mark up and other stuff. ...
2
votes
0answers
434 views

MongoDB daily document growth rate

Is MongoDB feasibly suited to handle 90,000,000 documents per day? Version 3.2. I did some rough estimates on my data size. There will be about 90,000,000 recorded events per day, each a maximum size ...
2
votes
0answers
196 views

how to convert mongodb(2.4.10) startup2 to primary

I have standalone bitnami mongodb(2.4.10). The output of rs.status() command is below : rs.status() { "set" : "test", "date" : ISODate("2015-11-13T08:07:41Z"), "myState" : 5, "members"...
2
votes
0answers
6k views

Mongodb Huge Number of Open Connections and Write Locks

We are seeing around 800 open connections to our Mongodb. To clarify our issue: We have 5 different clients who write the data into Mongodb. Each of these clients - write four different type of ...
2
votes
0answers
3k 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 E ...
2
votes
0answers
1k views

MongoDB Update with NODE-RED?

I am in the process of trying to move data around via MQTT with MongoDB as my storage engine. I am using Node-Red to get the MQTT data and store it as JSON objects in Mongo using the mongo node ...
2
votes
0answers
70 views

Should mongodb be run in a service, or a worker cluster?

I'm trying to implement an architecture that's similar to the coreos's production architecture (shown below) Should I run the database as a central service or one or more of the workers? I figured ...
2
votes
0answers
368 views

Why is our Non-Mapped Virtual memory usage high when running MongoDB (MMAP) on CENTOS

Our non-virtual virtual memory usage on our Linux MongoDb instances seems high, currently sitting just over 2GB. The instances are running a minimal installation of CENTOS (no GUI) and they acting as ...
2
votes
0answers
373 views

MongoDB C# driver fails to reconnect after stepDown

I have an Elastic Beanstalk environment in AWS that constantly verifies the DB is accessible by querying the mongos for one document. We only speak to the DB routers and not to specific instances. ...
2
votes
0answers
2k views

Understanding two types of mongodb log entries for bulk inserts

I have an app which does regular (every 2 minutes) bulk inserts to two identical instances of 2.6.4 mongodb on two servers. Both the instances are hosted on 2 Core, 14GB machine and have only one ...
2
votes
0answers
2k views

Positional Operator Matching Nested Arrays Workaround?

As was just pointed out to me on stackoverflow, Positional Operator Matching Nested Arrays has yet to be made available.. I need to display read.marked:true replies differently than read.marked:false ...
2
votes
0answers
702 views

MongoDB communication issues on Azure

I have a Python uWSGI app running behind Nginx using pymongo to communicate with a 4 machine replica set running Mongodb 2.6.3. The replica set is configured using domain names for each machine mdb-0[...
2
votes
0answers
2k views

Error to connect mongos when trying to create replicated sharded cluster

I'm trying to create an replicated sharded cluster in mongodb. Initially I've created two shards and there are a replica set with three members in each shard. And all the shards and replicasets run in ...
2
votes
0answers
946 views

Restore backup to staging replica set

I have a staging environment with Mongo replica set which I refresh on a regular basis. Refresh is done automatically using a bash script. Staging replica set consists of 3 members (primary, ...
2
votes
0answers
2k views

“Host has low open file limits” error in MMS

I am running Standalone MongoDB (v 2.6.0 64-bit) host on Centos (v 6.5). Centos is guest OS on Windows 7 host running under VirtualBox (4.3.10). MongoDB process runs under root account. And it is ...
2
votes
0answers
3k views

Storing files in Mongo's GridFS vs File System

I read the question here: https://softwareengineering.stackexchange.com/questions/150669/is-it-a-bad-practice-to-store-large-files-10-mb-in-a-database and this paper: http://research.microsoft.com/...
2
votes
0answers
564 views

MongoDB Sharding and Replica Set Allocation

I am going to setup MongoDB cluster: 3 config servers, 3 routing servers, 2 shards (replica set per shard). A replica set is just simply 1 primary, 1 secondary and 1 arbiter. Therefore, in my ...
2
votes
0answers
147 views

mysql vs mongodb cache/load balancing

I have a system where users can 'like' content. There will likely be many hundreds of these likes going on at once. I'd like it to be AJAX driven so you get an immediate response. At the moment I ...
2
votes
0answers
182 views

how to start sharding in mongodb

I am trying to learn sharding in MongoDb and here is my plan: I'm trying to shard the database S001 into 2 different machines. 192.xx.xx.60>mongod -configsvr --dbpath S001 ..Now running in ...
2
votes
0answers
283 views

MongoDB secondary heartbeat hangs

We have got the same issue in two replica sets in AWS cloud. According to rs.status() on primary secondary jumping between SECONDARY and unhealthy states. With period of 10-20 seconds. In logs I see ...
2
votes
0answers
517 views

Store large hierarchy in NoSQL each day and compare

I'm in the process of creating a utility that stores a fairly large hierarchy into a NoSQL document. The data of this is similar to an Active Directory / LDAP structure which contains sub groupings, ...
1
vote
0answers
27 views

MongoDB SECONDARY replica keeps failing on STARTUP2

I'm converting standalone existing MongoDB instance to a replica set for backing up without affecting primary instance. To test minimal replica deployment I've set up two MongoDB instances on the same ...
1
vote
0answers
31 views

Background index creation resource provisioning

I have a long running background index creation running in MongoDB. However, the CPU and RAM usage is below 30%. Is there a way to allocate more resources to the index creation process or is it ...
1
vote
0answers
16 views

splitting an string in an array into an array Mongodb

I have the current document: { "_id" : ObjectId("5c95b81b10ce2a953215c269"), "name" : "Œufs & Cie", "city" : "Brossard", "state" : "QC", "postal_code" : "J4Y 0G4", "...