-
Notifications
You must be signed in to change notification settings - Fork 665
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
Horizon does not recover after redis going away for a short time #716
Comments
I currently don't have time to check in on this so appreciating anyone who can help out here. |
We have spent quite a good amount of time today to experiment in what situations this happens, and found out an important detail: This ONLY happens with the phpredis driver. If you use predis driver, horizon has no issues with redis going away, and then coming back. It gracefully picks up where it left off. We were digging deep down into the code, but can not explain why with the phpredis driver the connection can not be established anymore, even if redis is available again. We are not using any persistent connections or anything of the sort. Attached are both exception traces from predis and phpredis driver: PREDIS
PHPREDIS
|
Question out of the blue: can the phpredis driver even do this on its own? |
Possible solution I've worked up here: laravel/framework#30778 |
Thank you @taylorotwell, i just checked out the change manually applied to the horizon & laravel-version we're running (stated in the ticket) and this does indeed solve the problem! Horizon now gracefully recovers if redis is gone for short, or long period of time. I highly suspect that this also solves my issue #708 just that there we are behind tls & auth, i suspect the reason is the same, just the error message was very misleading. We will be able to confirm when we've upgraded to the eventual new release of laravel (where this fix will be included) and rollout to our k8-setup. Not sure if these kind of tickets get closed before a release is created or only after? feel free to close if 'before'. |
Closing since the PR was merged. Will be in next Tuesday's release. |
Horizon Version: v3.4.2
Laravel Version: v6.0.3
PHP Version: 7.2.23
Redis Driver & Version: phpredis 5.1.1
Description:
If the used redis instance for horizon is not available even for a short period of time, it seems that horizon can not recover. Even if redis is back and available again, errors like
"ERROR: Redis server redis:6379 went away {"exception":"[object] (RedisException(code: 0): Redis server redis:6379 went away at"
will occur every second (this is our current sleep interval)
Steps To Reproduce:
Are we missing something obvious? This does not seem to be intended behaviour. We also started a ticket #708 which we later figured out was also due to network issues where redis was not available for a short time, but in that ticket we were experimenting with redis behind TLS & Auth.
We have now reproduced it locally without AUTH and no TLS. The behaviour is similar, but not sure if its exactly related.
The text was updated successfully, but these errors were encountered: