@bx80 opened this Issue on September 17th 2021 Contributor

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 commented on September 17th 2021 Contributor

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.

This Issue was closed on November 23rd 2021
Powered by GitHub Issue Mirror