Summer Sale! All accounts are 50% off this week.

miigaa's avatar
Level 24

Laravel using Managed Redis sometimes throws "Error while reading line from the server."

My Laravel app sometimes throws “Predis\Connection\ConnectionException - Error while reading line from the server.” exception. I used a managed Redis cluster from DigitalOcean. Do you guys face this type of error if yes how did you resolve?

0 likes
3 replies
MichalOravec's avatar

@miigaa Read this issue https://github.com/nrk/predis/issues/507

'redis' => [

    'client' => 'predis',

    'default' => [
        'scheme' => 'tls',
        'host' => env('REDIS_HOST', '127.0.0.1'),
        'password' => env('REDIS_PASSWORD', null),
        'port' => env('REDIS_PORT', 6379),
        'database' => 0,
    ],

],

Adding, 'schceme' => 'tls' could propably help to you.

1 like
miigaa's avatar
Level 24

Already schema is tls. The app usually works fine but sometimes faces this issue. Thanks

Please or to participate in this conversation.