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

Automatically kill SQL queries after a few hours to prevent issues #15903

Closed
mattab opened this issue May 4, 2020 · 2 comments
Closed

Automatically kill SQL queries after a few hours to prevent issues #15903

mattab opened this issue May 4, 2020 · 2 comments
Labels
duplicate For issues that already existed in our issue tracker and were reported previously.

Comments

@mattab
Copy link
Member

mattab commented May 4, 2020

In some cases, the DB can get stuck running SQL queries forever that won't complete or will take more than 1 day. This causes multiple issues downstream like blocking report processing delays, and also results in complicated to troubleshoot issues.

By using a Mysql-provided setting (MySQL 5.7+ provides max_execution_time variable), we can get all queries automatically killed if they take longer than X seconds. So if we set the value to say 8 hours, this would be a safe threshold as no query is expected to take longer than 1 hour or so...

@mattab mattab added the c: Performance For when we could improve the performance / speed of Matomo. label May 4, 2020
@Findus23
Copy link
Member

Findus23 commented May 4, 2020

See also #15241

@tsteur
Copy link
Member

tsteur commented May 4, 2020

Closing as a duplicate

@tsteur tsteur closed this as completed May 4, 2020
@tsteur tsteur added duplicate For issues that already existed in our issue tracker and were reported previously. and removed c: Performance For when we could improve the performance / speed of Matomo. labels May 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate For issues that already existed in our issue tracker and were reported previously.
Projects
None yet
Development

No branches or pull requests

3 participants