Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Track maximum runtime of currently running jobs #17

Merged
merged 3 commits into from
Apr 28, 2021

Conversation

Envek
Copy link
Member

@Envek Envek commented Apr 19, 2021

This is alternative implementation of #13 without querying Redis.

The goal:

useful metrics to keep track of the current running job runtime (see the "busy" section in the sidekiq admin panel).
This is mostly for alerting to determine time-consuming jobs

However, in implementation in #13 each Sidekiq worker executes query to Redis on each collect block execution, retrieves info about all executing jobs in all Sidekiq processes and single process reports not only its own stats, but also stats for every other worker. On large Sidekiq installations (with dozens processes executing hundreds of jobs at a time) it may be painful.

In this pull request, every worker process keeps track and reports runtime duration only for its own jobs in memory and doesn't any additional requests to Redis.

@Envek Envek mentioned this pull request Apr 21, 2021
@Envek Envek merged commit 91c8f4e into master Apr 28, 2021
@Envek Envek deleted the feature/running_job_max_runtime branch April 28, 2021 10:56
@Envek
Copy link
Member Author

Envek commented May 12, 2021

@dsalahutdinov, released in 0.8.0. Enjoy!

@dsalahutdinov
Copy link
Member

@Envek thx,
Btw, it might be useful for Amplifr, @dreikanter please take a look

@dreikanter
Copy link

@dsalahutdinov Cool, thank you! Will definitely use it. Thanks @Envek!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants