Categories
General

REDIS LARAVEL ConnectionException Error while reading line from the server.

Redis connection issue laravel Fix due to SSL read error on connection

Database config: config/database.php

'redis' => [
        'client' => 'predis',
        'cluster' => false,

        'default' => [
            'scheme'   => env('REDIS_SCHEME', 'tls'),
            'host'     => env('REDIS_HOST', 'localhost'),
            'password' => env('REDIS_PASSWORD', null),
            'port'     => env('REDIS_PORT', 6379),
            'database' => 0,
        ],
        'cache' => [
            'scheme'   => env('REDIS_SCHEME', 'tls'),
            'host'     => env('REDIS_HOST', 'localhost'),
            'password' => env('REDIS_PASSWORD', null),
            'port'     => env('REDIS_PORT', 6379),
            'database' => 1,
        ],
        'queue' => [
            'scheme'   => env('REDIS_SCHEME', 'tls'),
            'host'     => env('REDIS_HOST', 'localhost'),
            'password' => env('REDIS_PASSWORD', null),
            'port'     => env('REDIS_PORT', 6379),
            'database' => 2,
        ],
        'options' => [
            'parameters' => [
                'password' => env('REDIS_PASSWORD', null),
            ],
        ],
    ]

Leave a Reply