Timeline for How can I reduce time spent acquiring the mongodb schema lock?
Current License: CC BY-SA 4.0
16 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jun 11, 2020 at 9:43 | vote | accept | expez | ||
Feb 8, 2020 at 7:44 | answer | added | Ralf Strobel | timeline score: 6 | |
S Oct 8, 2019 at 14:02 | history | bounty ended | CommunityBot | ||
S Oct 8, 2019 at 14:02 | history | notice removed | CommunityBot | ||
Oct 2, 2019 at 16:45 | history | edited | expez | CC BY-SA 4.0 |
Turns out this happens on the primary node too.
|
Oct 2, 2019 at 15:19 | comment | added | expez |
This problem doesn't only affect the secondary, with the co-located service, that's just where I noticed it first. I'm seeing the same behavior on the primary now. I went through the logs to find when it appeared first and that time coincided with our upgrade from 4.0.6 to 4.0.10. We've recently dropped a lot of unused databases (40% of our total), but that didn't really improve the situation. In other words we had a lot more *.wt files before yet never experienced a schema lock on v 4.0.6.
|
|
Oct 2, 2019 at 15:08 | comment | added | expez |
We have 135k WiredTiger files at present. Most of the queries are simple find() queries, with the occasional aggregate() (let's say 1-2% or so).
|
|
Oct 2, 2019 at 1:27 | comment | added | Stennie |
Can you also share some further detail on the types of colocated queries that are being run extensively -- are these simple find() queries, aggregate() commands, or perhaps some other combination of commands?
|
|
Oct 2, 2019 at 1:27 | comment | added | Stennie |
I suspect the issue may be related to attributes of your overall deployment rather than specific queries which happen to be periodically affected. Can you provide some stats on the total number of WiredTiger files (*.wt ) in your dbPath? The schema lock is needed for anything that can modify schema (create, drop, rename, salvage, compact, verify, ...) and also to prevent changes while a certain stage of checkpoint is going on. Usually schema lock isn't a problem, but it could be if you have a large number of WT tables (on the order of 100s of thousands) and a checkpoint is in progress.
|
|
S Sep 30, 2019 at 12:51 | history | bounty started | expez | ||
S Sep 30, 2019 at 12:51 | history | notice added | expez | Authoritative reference needed | |
Sep 26, 2019 at 21:00 | history | tweeted | twitter.com/StackDBAs/status/1177327020021297152 | ||
S Sep 25, 2019 at 19:47 | history | suggested | Anthony Genovese |
added version and lock tag
|
|
Sep 25, 2019 at 19:31 | review | Suggested edits | |||
S Sep 25, 2019 at 19:47 | |||||
Sep 25, 2019 at 16:20 | review | First posts | |||
Sep 25, 2019 at 19:31 | |||||
Sep 25, 2019 at 16:15 | history | asked | expez | CC BY-SA 4.0 |