-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
PIDFILE contains only a single PID after starting multiple workers #1721
Comments
@z0marlin it is caused because in fact |
True. What could be a solution to this? I think appending to the file instead of overwriting and having a file lock should solve the problem. The file can be truncated initially to remove PIDs of the previous execution. |
Yeah, that sounds great for me. Additionally, there will be a
Unfortunately, I am afraid I don't have a time for creating PR for this issue right now/soon. |
No problem. Thanks for the describing the changes required. I'll start working on the patch. |
The workers now append to the PIDFILE instead of overwriting it. Adding file locking to handle race conditions when multiple workers are started using resque:workers. To clear any older data in the specified PIDFILE, it is now truncated once when the rake tasks resque:work and resque:workers are called. Created a proxy task resque:run to achive this. Fixes resque#1721
The workers now append to the PIDFILE instead of overwriting it. Adding file locking to handle race conditions when multiple workers are started using resque:workers. To clear any older data in the specified PIDFILE, it is now truncated once when the rake tasks resque:work and resque:workers are called. Created a proxy task resque:run to achive this. Fixes resque#1721
When starting multiple workers using rake task
resque:workers
and thePIDFILE
env variable, only a single pid is available in the specified file, although multiple workers were started.The text was updated successfully, but these errors were encountered: