Implement Time Limit for Archiving Jobs #22973
Labels
Enhancement
For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc.
Stability
For issues that make Matomo more stable and reliable to run for sys admins.
Background
Matomo's archiving process handles invalidations through archiving jobs, which may run across multiple servers. These jobs process invalidations sequentially until either all available invalidations are handled or further processing is blocked due to collisions with other running jobs.
Currently, administrators can set limits on archiving jobs to control:
However, in cases where there are numerous complex invalidations—such as those involving complex segments—archiving jobs can still run for extended periods, potentially lasting several days.
Problem Statement
Long-running archiving jobs can create significant issues, as Matomo relies on freshly started jobs to detect and process new invalidations, particularly for recent time periods such as yesterday or today. If all available archiving jobs are occupied for extended durations, no new invalidation requests may be generated. This can result in:
Proposed Solution
To mitigate these risks, we propose introducing a configurable time limit for archiving jobs. This feature would allow administrators to specify a maximum runtime for each job. Once the specified time limit is reached, the job should gracefully terminate and allow a new job to start.
Expected Behavior:
Benefits
Implementation Considerations
The text was updated successfully, but these errors were encountered: