-
Notifications
You must be signed in to change notification settings - Fork 758
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
worker never reconnect to redis server #180
Comments
That's odd. Credis's PHP implementation should try to reconnect automatically any time the worker interval passes, at least. Or crash; Credis has a bad habit of doing that when things go wrong. If the php-redis extension is installed, it should automatically reconnect at the interval without any help from Credis at all. So the fact this doesn't seem to be happening either way is... Well, as I said, that's odd. Since we expect the Redis library (Credis or php-redis) to handle reconnection as needed, we don't have any checks to ensure the connection is still established, nor to reestablish that connection ourselves. If the library is failing to handle reconnect properly on its own, as in your case, we will need to implement such checks and reconnects to address that. I will attempt to recreate the issue on my system and check back in with more info when I have. |
I have the same problem. It's quite simple to reproduce. start a worker - generate a job - job is done I'd suggest using the redis()->ping() method and try to trigger a reconnect if possible |
btw - even a dead worker would be better that something that looks like it is alive (for moniting checks / daemontools) |
I have the same problem. I think we should create a process to inspect the connection. |
PRs are always welcome. |
I run php-rescue's workers and shutting down redis server.
Then start redis again server.
workers are not down their process, but they aren't reconnect to redis server again.
If workers stop when redis is down, it can recovery again by some deamonizer tools,
but now, I have nothing to do with this problem.
Is there any solution to reconnect php-resque worker to recovered redis server?
The text was updated successfully, but these errors were encountered: