-
Notifications
You must be signed in to change notification settings - Fork 152
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
Resque workers die with Redis reconnect errors after kill -HUP #96
Comments
Browsing through old closed issues here, I found another one which references this, and the suggested solution to do something like: task "resque:pool:setup" do
ActiveRecord::Base.connection.disconnect!
Resque::Pool.after_prefork do
ActiveRecord::Base.establish_connection
Resque.redis.client.reconnect
end
end Seems to fix this for me, but I'm not sure why the initial workers would work fine and then subsequent ones would not. |
I had exactly the same problem and @wollkind solution works for me too. It would be good to at least add a small bit of info to the README file about this issue. FAQ entry maybe ? |
I believe I'm running into the same issue here as well. I'm coming here from trying to get logrotate configured properly and I have the "lastaction" set to send the HUP signal to the resque-pool manager PID. This is what we're told to do in the resque-pool README. My workers restart, but then are immediately reaped and go away. For example, in tailing the resque-pool.stdout.log after logrotate has run, I just see this again and again:
|
After I issue kill -HUP to the master process, I get an endless loop of workers that fail to start with the following error:
Failed to start worker : #Redis::InheritedError: Tried to use a connection from a child process without reconnecting. You need to reconnect to Redis after forking.
I'm trying to dig deeper and find out what's going on, but not getting too far. The initial batch of workers start up and process jobs just fine, but after a HUP nothing can start.
The text was updated successfully, but these errors were encountered: