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

Updates email report to query one day at a time. #94

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

elplatt
Copy link

@elplatt elplatt commented Dec 2, 2024

The reporting script running on the analysis machine stopped sending emails. The issue appeared to be mysql queries hanging due to heavy memory usage. In particular, queries of the mod_actions table were not completing. This change makes one query per day rather than making a single query for all days, reducing mysql memory usage.

The queries look like they could be optimized further, but it would require a more significant rewrite of the python code.

The reporting script running on the analysis machine stopped sending emails.
The issue appeared to be mysql queries hanging due to heavy memory usage. In
particular, queries of the mod_actions table were not completing. This change
makes one query per day rather than making a single query for all days,
reducing mysql memory usage.

The queries look like they could be optimized further, but it would require
a more significant rewrite of the python code.
Copy link
Collaborator

@wllrd wllrd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this looks good, and it's a working hotfix in production so it's an important baseline for future work.

my main suggestion would be to add a comment in the code explaining why it's running 7 queries rather than 1 big query.

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

Successfully merging this pull request may close these issues.

2 participants