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

Processes waiting indefinitely for exclusive locks while rotating #6

Open
sriedel opened this issue Mar 2, 2012 · 0 comments
Open

Comments

@sriedel
Copy link
Contributor

sriedel commented Mar 2, 2012

I'm currently using lumberjack as a resque logger with daily log rotation. When the log file needs to be rotated, the workers tend to hang indefinitely. Checking the process with strace reveals the worker is waiting for an exclusive lock on the logfile.

My current suspicion is that in lib/lumberjack/device/rolling_log_file.rb:106 stream.flock( LOCK::UN ) should be file.flock( LOCK_UN ) ?

As a workaround I'll add LOCK_NB to the LOCK_EX and return early if the lock could not be achieved for the time being.

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

No branches or pull requests

1 participant