-
Notifications
You must be signed in to change notification settings - Fork 138
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
bookie query kills mysql server #540
Comments
i am not sure, but this certainly looks like a degenerate case of the completion code in bookie.models.TagMgr.complete(). i wonder if we shouldn't put a minimum on the size of completion requests. for example, it looks like in the above query, it looks at all bookmarks that match there are multiple ways of doing this. one is in the UI:
... but i don't think that's the right approach, personnally, because a malicious API user could still blow up the database. besides, the above patch only limits the size of an alternative would be in the API itself:
I would suggest working on the latter, the number We'll try using the latter in production now. |
we sometimes see the mysql server freak out because of bookie mysql users:
The MySQL server would completely hog a CPU per such query, during a few minutes.
The complete query is:
EXPLAIN doesn't outline anything very obvious, other than filesort issues, which maybe means we need to ramp up the sort_buffer variable...
I was wondering if this query shouldn't be optimised in some way... That sure looks like a lot of subqueries...
The text was updated successfully, but these errors were encountered: