I have a server running Redis / Predis and everything will be running smoothly for one to maybe four or five days but then suddenly the site will be completely inaccessible with a ConnectionException:
'SELECT' failed: NOAUTH Authentication required. [tcp://127.0.0.1:6379]
If I then restart redis-server it will be fine again for a few days.
I have no idea what's causing this or why it works at first and then falls apart on me (seemingly) randomly. Anyone have any more information on what the NOAUTH Authentication exception means? And/Or what might be causing it to trigger after a random amount of time?
(Here is my redis config from config\database.php. It's basically just the default Laravel docs setup though.)
'redis' => [
'client' => 'predis',
'default' => [
'host' => env('REDIS_HOST', '127.0.0.1'),
'password' => env('REDIS_PASSWORD', null),
'port' => env('REDIS_PORT', 6379),
'database' => 0,
],
'options' => [
'parameters' => ['password' => env('REDIS_PASSWORD', null)],
]
],
That options section is something I found that was supposed to help with this error, but it made no difference. I don't even have a password set up for Redis. REDIS_PASSWORD just points to null as well in the .env