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

Limit max execution time for all SQL queries executed during report archiving #15241

Closed
mattab opened this issue Dec 5, 2019 · 0 comments · Fixed by #16971
Closed

Limit max execution time for all SQL queries executed during report archiving #15241

mattab opened this issue Dec 5, 2019 · 0 comments · Fixed by #16971
Assignees
Labels
c: Performance For when we could improve the performance / speed of Matomo.
Milestone

Comments

@mattab
Copy link
Member

mattab commented Dec 5, 2019

To prevent edge cases where archiving (via the core:archive crontab) may hang or run for a very long time (for example if a specific combination of custom reports dimensions and website size). It does happen regularly (especially for large Matomo instances) that some SQL queries may hang, and to prevent any of these "process hanging/archiving not completing" issues, we'd like to limit the max execution time for all SQL queries executed during report archiving.

This can be done with the MySQL SQL query hint MAX_EXECUTION_TIME.

By default we'd set the limit to 2 hours (configurable via INI setting).

The hint should only be added to archiving queries (it's already there in the Live real-time SQL queries), and make sure to not apply it to for example Matomo upgrades/schema changes.

@mattab mattab added the c: Performance For when we could improve the performance / speed of Matomo. label Dec 5, 2019
@mattab mattab added this to the 4.1.0 milestone Dec 5, 2019
@sgiehl sgiehl self-assigned this Dec 17, 2020
@mattab mattab modified the milestones: 4.1.0, 4.2.0 Dec 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: Performance For when we could improve the performance / speed of Matomo.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants