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

Getting database table stats slows down stats page #158

Open
maxmilton opened this issue Apr 27, 2022 · 2 comments
Open

Getting database table stats slows down stats page #158

maxmilton opened this issue Apr 27, 2022 · 2 comments
Labels
api bug Something isn't working

Comments

@maxmilton
Copy link
Owner

maxmilton commented Apr 27, 2022

Generating information about database table sizes takes a huge amount of time once there's a moderate amount of event data. Not only does this slow down the /stats page, it could also be a potential vector for DOS attacks.

See:

@maxmilton maxmilton added the bug Something isn't working label Apr 27, 2022
@maxmilton
Copy link
Owner Author

My best guess is it's related to system resources, namely disk I/O performance.

Even so, we need to prevent it being abused and leading to DOS + it's a generally poor user experience. A first step could be splitting the data into 2 API calls; a separate one for the slow data and another for everything else.

@maxmilton
Copy link
Owner Author

maxmilton commented Jun 4, 2022

For the time being the DB table stats are now behind a config option flag and disabled by default (#234). This is more of a workaround so I'll keep this issue open until we come up with a better solution.

@maxmilton maxmilton added the api label Jun 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant