Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

mmacdonald's avatar

Redis/ Predis - NOAUTH Authentication required starts happening randomly until I restart the service

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

0 likes
4 replies
graemlourens's avatar

Hi.

We have been seeing the same behaviour, but exclusively in the queue workers (via horizon). It seems it has something to do with the long-lived redis connection. Our guess is that reconnecting somehow is not doing the correct thing concerning auth that it should. (We indeed have Redis auth protected).

Did you find anything out in the past 10 months?

The proposed fix indeed seems to be working for us (Laravel 6 + Horizon & phpredis pecl library), but its only been 30 min since we deployed, so could still change...

Kind regards, Graem

graemlourens's avatar

We have new information concerning this issue.

It seems that even with that 'options' fix that this does not solve the issue. This was a false positive.

We are seeing this behaviour of redis when there are short network interruptions, and only with laravel horizon. Maybe this is a hint that will lead us somewhere sensible.

Any input highly appreciated.

Bebeto's avatar

Hi,

We having the same issue described by @mmacdonald. Try with or without Horizon.

Laravel 5.5 predis 1.1 Redis server v=4.0.9 with requiredpass set upped

Robstar's avatar

If anyone arrives here from Google and uses LaraDock, the solution is simple.

Later versions of LaraDock now set a Redis password. The default is secret_redis. So within your .env file simply set REDIS_PASSWORD=secret_redis 🚀

4 likes

Please or to participate in this conversation.