Reputation
951
Top tag
Next privilege 1,000 Rep.
See votes, expandable usercard
Badges
5 11
Newest
 Caucus
Impact
~21k people reached

Jul
27
comment MongoDB WiredTiger compression stats
Welcome to StackOverflow! This question would be better suited to DBA StackExchange as it is about database server messaging rather than a specific programming question. FYI, the WiredTiger count of pages that "failed to compress" indicates where compression didn't result in an on-disk storage saving so the pages were stored uncompressed. This is an informational counter and expected behaviour (i.e. unrelated to data integrity or a message to be concerned about).
Jul
21
comment Backup with mongoexport or mongodump?
It sounds like you're looking for an export rather than a backup. If you only export a subset of fields, presumably you won't be able to restore that and have a fully workable database. There are a few other options to consider: encrypt any fields with sensitive data (via application code) so that you can do a normal mongodump or filesystem snapshot backup, or write a custom export if mongoexport doesn't do what you need. Any tools or programs that read data from mongod could alter your working set if your data to export is bigger than avail RAM. Filesystem snapshots are less disruptive
Jul
18
comment Bypassing LDAP for MongoDb Users
MongoDB Enterprise is only available with a commercial support subscription or trial, so you should probably be filing an enquiry directly with MongoDB: contact form.
Jul
6
comment Adding wiredtiger nodes to a non-wiredtiger replica set
Setting the tcp_keepalive_time has definitely fixed the problem for other users with the same issue. I don't think you have a choice of not going through the Azure balancer or some other network gear that has the keepalive issue, so it's definitely worth a try. Note: In case you didn't check my profile .. I work for MongoDB ;-).
Jul
6
comment Adding wiredtiger nodes to a non-wiredtiger replica set
tcp_keepalive_time should be lowered as to 120 as per the production notes: "The TCP keepalive on the Azure load balancer is 240 seconds by default, which can cause it to silently drop connections if the TCP keepalive on your Azure systems is greater than this value. You should set tcp_keepalive_time to 120 to ameliorate this problem."
Jul
3
comment Adding wiredtiger nodes to a non-wiredtiger replica set
What is your tcp_keep_alive setting? That's the key one for Azure (especially if you are getting network timeouts). Insufficient ulimits will generally catch you at a later point in the initial sync process.
Jul
3
comment Adding wiredtiger nodes to a non-wiredtiger replica set
Have you reviewed the production notes for Linux & Azure? In particular I would make sure you have reduced the tcp_keep_alive timing to 120 seconds and increased your ulimits from the default before doing the initial sync.
Jul
3
comment Adding wiredtiger nodes to a non-wiredtiger replica set
You have to resync the data because the storage formats on disk are different. Are you getting a specific error during the initial sync? What is your specific O/S version and hosting type (eg AWS, Azure, bare metal, ...)?
Jul
2
comment MongoDB fsyncUnlock won't unlock occasionally on Windows
What version of MongoDB are you using (and if MongoDB 3.0, what storage engine)?
Jun
29
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 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.