every time I reboot a server and Redis is running locally (not on DBaaS), the Redis server is shut down first, then PHP, so the workers are trying to connect and get a connection refused. That triggers about 30 or so Log entries (which in my case, get sent to Slack).
I've tried to trace it back to the Exception thrown here: vendor/laravel/framework/src/Illuminate/Redis/Connections/PhpRedisConnection.php. It's not really an error because it's expected behaviour when rebooting. I see two options here:
Stop workers before a reboot
Don't throw the exception if the runlevel is 0 (shutdown) or 6(reboot)
@taylorotwell Would you accept a PR that basically checks if OS == linux && (runlevel ==0|| runlevel == 6) && error == connection refused then don't throw the exception? I'd be happy to write it but won't if you wouldn't merge it ;)
Of course, I would have to research how to do this on MacOS/BSD (probably the same) and Windows (probably not) but I could do it for Linux in a first step.
Hi,
every time I reboot a server and Redis is running locally (not on DBaaS), the Redis server is shut down first, then PHP, so the workers are trying to connect and get a connection refused. That triggers about 30 or so Log entries (which in my case, get sent to Slack).
I've tried to trace it back to the Exception thrown here:
vendor/laravel/framework/src/Illuminate/Redis/Connections/PhpRedisConnection.php
. It's not really an error because it's expected behaviour when rebooting. I see two options here:runlevel
is0
(shutdown) or6
(reboot)@taylorotwell Would you accept a PR that basically checks
if OS == linux && (runlevel ==0|| runlevel == 6) && error == connection refused
then don't throw the exception? I'd be happy to write it but won't if you wouldn't merge it ;)Of course, I would have to research how to do this on MacOS/BSD (probably the same) and Windows (probably not) but I could do it for Linux in a first step.
Full Log entry: