You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a docker swarm setup, and maybe will also be replicable in any other environment.
When redis dropped for whatever reason like redis container restarting or redis container stopped, laravel reverb will print out this error and then it will stop broadcasting messages:
Unhandled promise rejection with RuntimeException: Connection to tcp://10.123.0.9:6379?hostname=redis failed: Connection refused (ECONNREFUSED) in /var/www/vhosts/localhost/vendor/react/socket/src/TcpConnector.php:148
and also this error too after error above:
Next RuntimeException: Connection to tcp://redis:6379 failed: Last error for IPv4: Connection to tcp://10.123.0.9:6379 failed: Connection refused (ECONNREFUSED). Previous error for IPv6: DNS query for redis (AAAA) did not return a valid answer (NOERROR / NODATA) in /var/www/vhosts/localhost/vendor/react/socket/src/HappyEyeBallsConnectionBuilder.php:210
Even after the redis container return online and can accept connection, laravel reverb still failed to send any new broadcast messages.
Only after redis is back online and reverb is restarted, laravel reverb will function normally.
Steps To Reproduce
This is the steps to reproduce the bug:
Initialize redis and make sure it's accepting connection.
Start laravel reverb, make sure the log in laravel reverb print out INFO Starting server on 0.0.0.0:6001 (<anyhostname>). and it's accepting any broadcast messages.
Stop redis either by stopping it's container (if it's in docker setup) or the redis service (if it's installed on host).
Make sure the reverb print the error first that it can't connect to redis now.
After reverb print the error, restart the redis. Make sure we can connect to redis and it's accepting connection again.
Now try to send broadcast message through reverb, it will fail to send any broadcast messages.
If reverb is restarted, reverb will function normally again.
The text was updated successfully, but these errors were encountered:
nathanaelytj
changed the title
Reverb Broadcast Stop If Redis Connection Lost
[BUG] Reverb Broadcast Stop If Redis Connection Lost
Oct 17, 2024
As Laravel is an open source project, we rely on the community to help us diagnose and fix issues as it is not possible to research and fix every issue reported to us via GitHub.
If possible, please make a pull request fixing the issue you have described, along with corresponding tests. All pull requests are promptly reviewed by the Laravel team.
Reverb Version
1.4.1
Laravel Version
11.28.1
PHP Version
8.3.10
Description
This is a docker swarm setup, and maybe will also be replicable in any other environment.
When redis dropped for whatever reason like redis container restarting or redis container stopped, laravel reverb will print out this error and then it will stop broadcasting messages:
Unhandled promise rejection with RuntimeException: Connection to tcp://10.123.0.9:6379?hostname=redis failed: Connection refused (ECONNREFUSED) in /var/www/vhosts/localhost/vendor/react/socket/src/TcpConnector.php:148
and also this error too after error above:
Next RuntimeException: Connection to tcp://redis:6379 failed: Last error for IPv4: Connection to tcp://10.123.0.9:6379 failed: Connection refused (ECONNREFUSED). Previous error for IPv6: DNS query for redis (AAAA) did not return a valid answer (NOERROR / NODATA) in /var/www/vhosts/localhost/vendor/react/socket/src/HappyEyeBallsConnectionBuilder.php:210
Even after the redis container return online and can accept connection, laravel reverb still failed to send any new broadcast messages.
Only after redis is back online and reverb is restarted, laravel reverb will function normally.
Steps To Reproduce
This is the steps to reproduce the bug:
INFO Starting server on 0.0.0.0:6001 (<anyhostname>).
and it's accepting any broadcast messages.The text was updated successfully, but these errors were encountered: