redis icon indicating copy to clipboard operation
redis copied to clipboard

Problem with redis connection

Open LordDeveloper opened this issue 2 years ago • 0 comments

I found a problem in redis, This is my redis connection configuration:

$config = config('redis');

if (isset($config['host']) && isset($config['port'])) {
    $uri = Config::fromUri('redis://' . $config['host'] . ':' . $config['port'] . '?' . http_build_query([
            'password' => $config['password'] ?? '',
            'timeout' => $config['timeout'] ?? '',
            'database' => $config['database'] ?? 0,
        ]));

    return new Redis(new RemoteExecutor($uri));
}
return null;

I have a infinite loop, After running each query, The redis connect and disconnect from redis server.

image https://github.com/amphp/redis/blob/90aa4f50d7889a880d15e6e4a504b398e16faa82/src/RemoteExecutor.php#L84

image

LordDeveloper avatar Jul 23 '22 11:07 LordDeveloper