Skip to content
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

502 Error when searching with high delta on few users #467

Open
mattiaverga opened this issue Aug 9, 2022 · 3 comments
Open

502 Error when searching with high delta on few users #467

mattiaverga opened this issue Aug 9, 2022 · 3 comments

Comments

@mattiaverga
Copy link

mattiaverga commented Aug 9, 2022

Searching for actions from a few users causes 502 Error response when using high delta in query.
For example:
https://apps.fedoraproject.org/datagrepper/raw/?user=karsten&category=bodhi&order=desc&rows_per_page=50&delta=5184000

I can reproduce every time with user karsten with a delta of 60 days, but I don't think it's due to too many entries detected for the user, as a delta of just 30 days shows no entries (but it takes a lot of time).
Querying other users with the same delta and with much more activity doesn't show any problem and the reply is blazing fast. For example:
https://apps.fedoraproject.org/datagrepper/raw/?user=mattia&category=bodhi&order=desc&rows_per_page=50&delta=5184000

@abompard
Copy link
Member

I've reproduced it, thanks for reporting. There's possible a short term fix which is to increase the timeout on the gunicorn server, as the query actually takes 1m15s and the timeout is at 1m. But it's strange that the query takes that long, I'm going to try to reproduce on staging and try some things.

@abompard
Copy link
Member

Hmm, it's very fast on staging unfortunately.

@mattiaverga
Copy link
Author

Some more background about the bug: I've seen this while running a script that checks users activity with a delta of 1 year, the full URL queried by the script is:
https://apps.fedoraproject.org/datagrepper/raw/?user={p}&category=bodhi&order=desc&delta=31536000&rows_per_page=50&page={page}

The 1 year delta is not a problem for the vast majority of users, but for some reason for a few users the query slows down at the point the server response times out.
The users causing this odd behavior are always the same, user karsten is one of them, I can report some other if it can help.
Running the same query for the problematic user without the delta parameter makes the query as fast as for other users:
https://apps.fedoraproject.org/datagrepper/raw/?user=karsten&category=bodhi&order=desc&rows_per_page=50
but by adding even a small amount to the delta parameter makes the query slow down:
https://apps.fedoraproject.org/datagrepper/raw/?user=karsten&category=bodhi&order=desc&rows_per_page=50&delta=172800

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants