fix(cron): Log long running jobs#45804
Merged
ChristophWurst merged 1 commit intomasterfrom Jun 12, 2024
Merged
Conversation
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
AndyScherzinger
approved these changes
Jun 12, 2024
kesselb
approved these changes
Jun 12, 2024
Member
Author
|
/backport to stable29 |
Member
Author
|
/backport to stable28 |
Member
Author
|
/backport to stable27 |
2 tasks
Member
Author
|
/backport to stable27 |
2 tasks
8 tasks
Member
|
/backport to stable28 |
2 tasks
Member
|
@AndyScherzinger can we have a back port for 25 ? |
Member
|
/backport to stable26 |
Member
|
/backport to stable25 |
Member
|
@marinofaggiana I don't know, let's try and see if the bot can create them 🤞 |
2 tasks
2 tasks
Member
|
So PR could be created but is incomplete according to the bot #46706 @marinofaggiana - best you align with @ChristophWurst to have them wrapped up for 25 and 26 |
Member
|
ok |
Merged
Member
Author
|
Let's try porting from 27, where I have already had to resolve conflicts: #45855 (comment). |
Member
Author
|
Worked. @AndyScherzinger @marinofaggiana if you need more backports use stable27 as base |
This was referenced Aug 7, 2024
5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
If cron jobs take a very long time to complete they will start to run in parallel. That's because jobs are only reserved for 12h. Afterwards we just assume that the jobs failed and start the job again. In faulty situations that can lead to more and more server load.
Here is an example:
It looks like a job executes an expensive query over and over. After 12h the query time doubles, after 24h it triplicates, after 36h it quadruples, etc. It's not clear if that is what is really happening.
I've tried to be reasonable with the log level so we don't spam the logs too much:
TODO
Checklist