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
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.