-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
When querying a (large) class on a non-existing, parse causes huge amounts of iOPS on Mongo #4327
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@SebC99 That's not so great :/. This is a hard one for us to replicate... Can you provide details on the queries involved as well as the relevant structure of the classes that this happens on (omitting anything extraneous or sensitive as you need to). If there's nothing suspicious you should take profiles of parse-server while this happening, could help pin down what's causing all the activity a bit more. Additionally any relevant information noted in the logs would be handy (with VERBOSE of course). |
perhaps the IOPS happened because data went to RAM, then everything was read from there no? |
In any case I recommend you to use the
This willl let mongo kill the long query (if it exceeds 500ms) |
@montymxb who can I get that profile of parse-server?
And then I have this peak in IOPS. I have a "Place" collection, in which there's 8 millions document. This class doesn't have any field named "owner", but I try to query on this field:
The IOPS peak comes with an increase of Read Cache Activity, and with an huge increase in Query Targeting index ("The ratio of the number of documents scanned to the number of documents returned by queries"). The targeting index increases 5 time less with the same query in mongo shell. Any idea how to investigate more? |
As far as profiling goes there a # of choices, but V8 has a built in one that node js talks about here that would be handy. Thanks for adding those extra details by the way. I would think that it would simply check |
Ost probably because we add the additional _rperm constraint, making the issue even worst |
As this is a database issue then the mongodb log file would help further diagnose. Both the parse query and the console query take more than 100ms so should both appear in the log. You should be able to download the log for the primary from Atlas on the Cluster Overview and restrict timestamps to cover the range of interest. You may want to sanitize the log to remove data or if you are up for it run mtools on the log to summarise the data https://github.com/rueckstiess/mtools. I suggest running Checking schema before querying seems like a great solution. |
Hello, I'm still trying to investigate these performance issues.
For example, here's an extract of the logs:
When running in shell, the same query doesn't seem to trigger getMore operations... |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Issue Description
I have a collection (parse class) with more than 8M documents in it, and when we make a query on a non-indexed field, or even worse on a non-existing field (by mistake), it leads to huge amount of iOPS on MongoDB instances, which leads to a hang of the parse server becoming unreachable (timeout issues).
When I run the same queries via a mongo shell, it takes some time (around 10-20 seconds) but never leads to those kind of amount of iOPS... whereas it should be the exact same query.
Below is a screen capture of the MongoDB metrics, showing the IOPS peak at 10:54 (corresponding to the parse query), and then the IOPS "non peak" at 11:01, 11:03, 11:06 corresponding to the same query via Mongo Shell (reproduced 3 times to be sure).
Any idea?
Environment Setup
Server
Database
The text was updated successfully, but these errors were encountered: