Skip to content

maintenance: Remove per-repository timeouts in nightly maintenance

Our nightly maintenance job is running in a time-limited window of 30 minutes by default. Despite this timeout we have in place for the complete maintenance job we also have a per-repository timeout of 5 minutes that cannot be altered at all. This timeout exists so that as many repositories as possible have the chance to get optimized.

In total this per-repository timeout creates more harm than benefit though. While it may in fact cause us to optimize more repositories, it also has the effect that we may consistently fail to optimize any repos which are bigger than a certain threshold because they take more than 5 minutes to optimize. So this timeout prioritizes small repositories and penalizes huge repositories.

This is indeed nothing we want. In fact, I'd even argue that maintaining repositories that are this huge is a lot more important than maintaining the smaller ones given that they're so much more expensive to serve.

Drop the per-repository timeout to stop penalizing large repositories. Optimizing them will still be cancelled when the overall timeframe for the nightly maintenance job is over.

Changelog: fixed

Closes #4345 (closed).

Merge request reports