池中没有可用的连接,laravel predis

vnzz0bqm  于 2021-06-10  发布在  Redis
关注(0)|答案(0)|浏览(240)

我在awz elasticache上的laravel7、php7.4和redis服务器下出现错误“池中没有可用的连接”。
我的环境:

REDIS_CLIENT=predis
REDIS_SCHEME=tls
REDIS_HOST=clustercfg.xxx.xxx.xxx.cache.amazonaws.com
REDIS_PASSWORD=xxx
REDIS_PORT=6379

我的config/database.php:

'redis' => [
         'cluster' => true,
         'client' => 'predis',
         'options' => [
             'cluster' => 'redis',
             'parameters' => [
                 'scheme'   => env('REDIS_SCHEME', 'tcp'),
                 'host'     => env('REDIS_HOST', 'localhost'),
                 'password' => env('REDIS_PASSWORD', null),
                 'port'     => env('REDIS_PORT', 6379),
                 'database' => 0,
                 'timeout' => 15,
              ],
         ],

         'clusters' => [
             'default' => [
               [
                 'scheme'   => env('REDIS_SCHEME', 'tcp'),
                 'host'     => env('REDIS_HOST', 'localhost'),
                 'password' => env('REDIS_PASSWORD', null),
                 'port'     => env('REDIS_PORT', 6379),
                 'database' => 0,
                 'timeout' => 15,
               ]
             ],
             'cache' => [
               [
                 'scheme'   => env('REDIS_SCHEME', 'tcp'),
                 'host' => env('REDIS_HOST', '127.0.0.1'),
                 'password' => env('REDIS_PASSWORD', null),
                 'port' => env('REDIS_PORT', 6379),
                 'database' => env('REDIS_CACHE_DB', 1),
               ]
             ],
         ],
     ],

clustercfg....cache.amazonaws.com是我的配置端点,redis\u password是我的身份验证令牌

我基本上复制了带有laravel 5.5“no connections available in the pool in aggregate/rediscluster的predis解决方案。php:337 "
但问题并没有解决。
我看过亚马逊的vpc安全组,基本上所有的端口都是开放的:

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题