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

Max execution timeout exceptions for archiving are not handled #18025

Closed
bx80 opened this issue Sep 17, 2021 · 1 comment · Fixed by #18357
Closed

Max execution timeout exceptions for archiving are not handled #18025

bx80 opened this issue Sep 17, 2021 · 1 comment · Fixed by #18357
Assignees
Labels
Bug For errors / faults / flaws / inconsistencies etc.
Milestone

Comments

@bx80
Copy link
Contributor

bx80 commented Sep 17, 2021

The maximum database query execution timeout for archiving queries defaults to two hours and may also be overridden with a custom timeout value in config.ini.php

When an archiving query exceeds this timeout a 'maximum statement execution time exceeded' exception is returned.

Expected Behavior

The max execution time exception for archiving queries should be caught and used to trigger an event in the same way that the live query Model::handleMaxExecutionTimeError() method works. This event can then be used to provide notifications that the archiving operation has failed due to query timeout.

We need to make sure the user will be aware if queries run into timeouts.

The goal of this issue is that when you run the archiving using core:archive command, then the archiving will fail and an exception message is shown and it's clear what happened. Ideally also which query caused the issue (if any possible).

Current Behavior

The max execution time exception is currently not caught for archiving queries and the archiving operation will silently fail. If an archiving query is slow enough to consistently exceed the timeout then archiving may never complete for some reports and without notification it could be difficult to determine why.

@bx80 bx80 added the Bug For errors / faults / flaws / inconsistencies etc. label Sep 17, 2021
@tsteur tsteur added this to the 4.7.0 milestone Sep 17, 2021
@bx80
Copy link
Contributor Author

bx80 commented Sep 17, 2021

Once this issues is implemented then the FAQ How can I automatically stop long running database queries? will need updating to explain about notification options.

@bx80 bx80 self-assigned this Nov 19, 2021
@bx80 bx80 mentioned this issue Nov 22, 2021
11 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug For errors / faults / flaws / inconsistencies etc.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants