Reputation
871
Top tag
Next privilege 1,000 Rep.
See votes, expandable usercard
Badges
5 10
Newest
 Yearling
Impact
~19k people reached

1d
comment Ring topology support of MongoDB ReplicaSet and Sharding?
NB: Not directly related to the topology question, but you should definitely upgrade to the latest production version for your branch of MongoDB (currently 2.4.14) as there have been a number of important bug, stability, and security fixes in the two years since 2.4.5 was released (ref: release notes for MongoDB 2.4).
Jun
27
comment MongoDB C# driver fails to reconnect after stepDown
Assuming you have the correct connection string, the expected behaviour is that the driver will automatically discover any changes in your deployment as a result of elections or replica set / sharding configuration. There will be a brief window of exceptions raised for situations where a primary is currently unavailable, but writes will switch to a newly elected primary. Can you include an example of your connection string?
Jun
27
comment Mongo is using 5-7% of CPU, so why is my computer so slow?
CPU generally isn't the limiting factor for MongoDB, particularly if you are doing simple inserts. If the whole instance is slow, I/O and memory are more likely resource constraints .. you need to look at metrics such as iostat and page faults. You also haven't indicated your EC2 instance type or storage configuration, but I wouldn't have any great performance expectations for free tier or low cost instances (eg. micro & small ).
Jun
26
comment Data dump from Mongo to CSV
The utilities you've mentioned (screen and nohup) are for keeping terminal sessions or processes running if your terminal disconnects. I would suggest screen is a more suitable tool for long running sessions because you can resume an interactive shell .. but either of those should work. I would expect that the speed of mongoexport should be unrelated to the utility you are using the start the process (and more strongly correlated with other load on your MongoDB deployment), but in any case it seems like you've already answered the question for your environment.
Jun
26
comment Mongodb high lock percentage / slow queries
@Alistair Worth posting a separate question on a query/update that has variable performance. If there are multiple candidate indexes, perhaps a poor index is periodically being chosen? You should include the output of 'explain(true)' for the query which will show more details on the candidate indexes considered. Also to note: query timing with explain() is expected to be slower than the actual runtime of the query as you are forcing plan evaluation.
Jun
26
comment Why is our Non-Mapped Virtual memory usage high when running MongoDB (MMAP) on CENTOS
Each database connection (active or idle) is allocated 1MB of RAM. Other reasons for increased non-mapped virtual memory usage are server-side processing (JavaScript, Map/Reduce, aggregation, in-memory sorts, ...). What is the role of the Linux machines as compared to the Windows machine in your replica set (i.e. primary vs secondary)? Are you doing secondary reads (default is all reads/writes directed to the primary)?
Jun
26
comment how to make secondary slave as readable in MongoDB?
Are you referring to mongo shell sessions, or access via driver?
Jun
16
comment Mongodb high lock percentage / slow queries
Have you checked indexes and explained your slow queries? Note: you won't see any queries slower than 100ms in the logs because that's the default slow query threshold. If you can share the logs there is probably helpful context such as other slow operations. I would recommend watching Asya's talk on Debugging & Diagnostics for some background on performance troubleshooting.
Jun
16
comment Does the MongoDB background flush (MMAP) update the entire document even if only a small portion has changed? i.e. set on an array position
What specific version of MongoDB and O/S are you using, and what sort of storage config (file system & disk type)? Also, how long are your average flush times? Flush times are only part of the overall picture so in isolation it's hard to guess what the problem might be. Are you using a monitoring service like MMS? If so, are there any other metrics that appear to correlate with your long flush times?
Jun
11
comment mongodump with readpref nearest
FYI, there is an open feature request you can watch/upvote in the MongoDB issue tracker: TOOLS-630: Allow specifying readPreference (including tags).
May
21
comment MongoLab: Does hardware effect performance of a find() query
Available server resources can definitely affect the speed of results. Unless there is an issue with provisioning it seems likely that a dedicated plan should overall be better than a shared plan, and either of those should be an improvement on a free plan. However, the actual outcome will depend on your use case and where your performance bottleneck(s) are. You're best asking MongoLab directly to find out what relative performance benefits to expect.
May
16
comment How to force a delayed member to become primary in case of failure in mongodb
This question should be moved to DBA. Note: promoting a delayed secondary to primary is not recommended. Any changes outside of the delay will be missing (i.e. 1 hour delay means 1 hour of data inserts/updates/deletes not applied on the delayed node). If you force a stale/delayed node to become primary, any other data nodes will rollback to a consistent state with the current primary when they rejoin the replica set. You really want non-delayed nodes for failover.
Apr
28
comment Mongo primary is showing behind the primary?
What is reported by db.version() and version() in the mongo shell? Have you recently upgraded your version of MongoDB or is this a fresh install?
Apr
24
comment Setting up MongoDB MMS on Sharded Cluster
If you have a sharded cluster, you should able to add the address of one of your mongos servers and have the rest of the cluster discovered. If you're still having trouble .. can you comment with a link to the MMS group (or the group name) in MMS so someone from MongoDB can help investigate? Thanks.
Apr
21
comment How MongoDB allocate new data block when data block is full
Note that this description only applies to the default MMAP storage engine (MongoDB 3.0 and earlier). Optional storage engines in MongoDB 3.0+ (eg. WiredTiger) have different allocation strategies and some considerations such as document padding may not be applicable.
Apr
3
comment Replica Set In Mongo Are All Primary
You only need to run rs.initiate() once, which is on the first node you initialise to become a primary. Secondaries should be added via rs.add() on the primary. A common mistake is to run rs.initiate() on all nodes which results in creating three one-node replica sets with the same name (rather than one replica set with three nodes). From your description, it sounds like this is what you may have done. If so, the fix would be to delete the data directories from your secondaries and rs.add() those nodes to the replica set via the primary.
Mar
24
comment Genghis admin ui not working with mongodb 3.0.1 wired tiger
There weren't any changes in the PHP 1.6.6 driver that should have affected this, but good to hear you resolved your problem :)
Mar
23
comment Genghis admin ui not working with mongodb 3.0.1 wired tiger
Hrm .. haven't been able to reproduce the issue. What version of Genghis are you running? Can you try to run a standalone test with just $db->listCollections() in a PHP script?
Mar
21
comment Genghis admin ui not working with mongodb 3.0.1 wired tiger
Are you certain you are using the 1.6.5 PHP driver? Can you check via phpinfo() to be certain? If the listCollections() call isn't working with WiredTiger storage, this usually indicates an older driver that does not support the new listCollections server command required for WiredTiger in MongoDB 3.0. I just tried Genghis 2.3.11 with the 1.6.5 PHP driver and it works fine for listing collections with WiredTiger storage.
Mar
20
comment MongoDB production security and backup
@AyeyeBrazo There are commands listed if you follow the tutorials for a specific approach. For example: Back Up and Restore with MongoDB Tools or Back Up With Filesystem Snapshots. There are different approaches to backup depending on your deployment type and requirements. What specific steps/examples are you looking for ? What sort of deployment do you have (single node, replica set, ..)?