Skip to content
New issue

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

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

Already on GitHub? # to your account

Add option to silence log output after a time out #598

Closed
wants to merge 2 commits into from

Conversation

yboulkaid
Copy link
Contributor

When a lock cannot be acquired, the default behavior is to output a warning to inform the developer.

We ran into a case where we were pushing thousands of jobs to a queue, including many duplicates.
This caused a large number of log lines to be output, drowning our logs in noise:

WARN: Timed out after 0s while waiting for primed token (digest: uniquejobs:[...], job_id: [...])

This PR introduces a configuration option to allow for disabling this output. We the option defaults
to false so that the behavior out of the box is kept the same.

What do you think of this approach/feature?

@mhenrixon
Copy link
Owner

Uff, that reminds me I need a better way of handling this.

I really appreciate the effort that went into this PR. Don't get me wrong, unless I can come up with a better solution to this problem I will merge it.

What I have in mind is something more like active support notifications that the gem user can subscribe to.

This could be used for some instrumentation and debugging as well. Right now, the debugging is done in redis.

Let me consider this again. I've put it off for quite some time due to not having a clear picture of how it would look. The way you described the problem helped clear out some of that mentally.

@yboulkaid
Copy link
Contributor Author

Thanks for the quick and thorough reply! Yes, an opt-in solution in the style of active support notifications would be really nice 👍

Let me know if I can help in any way :)

@mhenrixon mhenrixon mentioned this pull request May 5, 2021
@mhenrixon
Copy link
Owner

@yboulkaid you should see fewer of these log entries in the future. I had a mismatch between the Concurrent ruby waiting time and the waiting time on the blocking command for redis.

@mhenrixon
Copy link
Owner

v7.0.10

@yboulkaid
Copy link
Contributor Author

yboulkaid commented May 11, 2021

Great! We will test that out, thanks! 🙏 :)

@mhenrixon
Copy link
Owner

Closed by #610 and later #611

@mhenrixon mhenrixon closed this Jun 4, 2021
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants