Archive for the ‘MongoDB’ Category
“WT_CONNECTION.open_session: only configured to support 20020”
Frankly speaking, the explanation provided in SERVER-30421 and SERVER-17364 is a bit vague and “hand wavy” to me but at least there are steps that could help mitigate it: Decrease idle cursor timeout (default value is 10 minutes): In mongodb.conf: setParameter: cursorTimeoutMillis: 30000 Using mongo cli: use admin db.runCommand({setParameter:1, cursorTimeoutMillis: 30000}) Increase session_max: storage: wiredTiger: […]
Changing Oplog size or when root role is not enough
Managing MongoDB sometimes involves increasing Oplog size sine the default setting (5% of free disk space if running wiredTiger on a 64-bit platform) is not enough. And if you’re running MongoDB older than 3.6 that requires some manual intervention described in the documentation. It’s pretty straightforward even if it requires a node downtime as part […]
MongoDB 3.4 or stay on 3.2?
If you’re herding multiple shards this one should be convincing enough to jump on 3.4 bandwagon: mongos> sh.getBalancerHost() getBalancerHost is deprecated starting version 3.4. The balancer is running on the config server primary host.
How to reuse dropped sharded collection’s name
It happens that sometimes you want to drop your sharded collection and be able to reuse its name again. However, it might not be as straightforward as one expects it to be: mongos>sh.shardColelction(“your_database.your_collection”, { “sharded_key”: 1}) “code” : 13449, “ok” : 0, “errmsg” : “exception: collection your_database.your_collection already sharded” The error message might be different […]
TIL MongoDB Index Build could exceed 100%
A quote from SERVER-7631: Since data can be inserted while its running, this can go over 100 by design.
Restart your Mongos after maxConsecutiveFailedChecks
Take it literally. If you configured your MongoDB config servers as a replica set and for some reason, say a network outage, Mongos server lost connection to all of them and is not able to reconnect during maxConsecutiveFailedChecks attempts then, surprise, it becomes useless. Even if the network is up and running again, Mongos will […]
jbd2 is munching your disks? Use ftrace to find why.
Have you ever been wondering why jbd2 (or jbd if your are still using ext3) is sitting at the top of iotop and consuming the most of IO bandwidth? Well, it’s certainly not because it’s doing that just to drive you nuts but there is a reason. And the reason is most probably there is […]
MongoDB – Defeating RangeDeleter
Not closing a cursor in MongoDB could hurt you big, so it’s generally not recommended to use no_cursor_timeout=True (pymongo3) or timeout=False (pymongo2). Especially when you run shared MongoDB installation: PyMongo does “close” cursors when they are garbage collected, but they aren’t closed immediately and closing a cursor in all current versions of MongoDB is asynchronous. […]