pbootcms网站模板|日韩1区2区|织梦模板||网站源码|日韩1区2区|jquery建站特效-html5模板网

<legend id='9STiS'><style id='9STiS'><dir id='9STiS'><q id='9STiS'></q></dir></style></legend>
    <bdo id='9STiS'></bdo><ul id='9STiS'></ul>

    1. <tfoot id='9STiS'></tfoot>

      <small id='9STiS'></small><noframes id='9STiS'>

      1. <i id='9STiS'><tr id='9STiS'><dt id='9STiS'><q id='9STiS'><span id='9STiS'><b id='9STiS'><form id='9STiS'><ins id='9STiS'></ins><ul id='9STiS'></ul><sub id='9STiS'></sub></form><legend id='9STiS'></legend><bdo id='9STiS'><pre id='9STiS'><center id='9STiS'></center></pre></bdo></b><th id='9STiS'></th></span></q></dt></tr></i><div class="yekkaeg" id='9STiS'><tfoot id='9STiS'></tfoot><dl id='9STiS'><fieldset id='9STiS'></fieldset></dl></div>

        帶有 laravel 5.5 的 Predis“Aggregate/RedisCluster.php:33

        Predis with laravel 5.5 quot;No connections available in the pool in Aggregate/RedisCluster.php:337 quot;(帶有 laravel 5.5 的 Predis“Aggregate/RedisCluster.php:337 中的池中沒有可用連接) - IT屋-程序員軟件開發技術分享社

        <legend id='14qp0'><style id='14qp0'><dir id='14qp0'><q id='14qp0'></q></dir></style></legend>

          <i id='14qp0'><tr id='14qp0'><dt id='14qp0'><q id='14qp0'><span id='14qp0'><b id='14qp0'><form id='14qp0'><ins id='14qp0'></ins><ul id='14qp0'></ul><sub id='14qp0'></sub></form><legend id='14qp0'></legend><bdo id='14qp0'><pre id='14qp0'><center id='14qp0'></center></pre></bdo></b><th id='14qp0'></th></span></q></dt></tr></i><div class="0swwk2s" id='14qp0'><tfoot id='14qp0'></tfoot><dl id='14qp0'><fieldset id='14qp0'></fieldset></dl></div>

        • <tfoot id='14qp0'></tfoot>

              <tbody id='14qp0'></tbody>

            <small id='14qp0'></small><noframes id='14qp0'>

                  <bdo id='14qp0'></bdo><ul id='14qp0'></ul>
                • 本文介紹了帶有 laravel 5.5 的 Predis“Aggregate/RedisCluster.php:337 中的池中沒有可用連接"的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  我已經在 Amazon ElastiCache 上為緩存設置了 redis-cluster,使用 Laravel 5.5 和 Predis 包,我收到以下錯誤.

                  PredisClientException: 在 vendor/predis/predis/src/Connection/Aggregate/RedisCluster.php:337 中的池中沒有可用的連接

                  <塊引用>

                  跟蹤:PredisClientException: 在 vendor/predis/predis/src/Connection/Aggregate/RedisCluster.php:337 中的池中沒有可用連接

                  堆棧跟蹤:

                  0 vendor/predis/predis/src/Connection/Aggregate/RedisCluster.php(411):PredisConnectionAggregateRedisCluster->guessNode(153)

                  1 vendor/predis/predis/src/Connection/Aggregate/RedisCluster.php(388):PredisConnectionAggregateRedisCluster->getConnectionBySlot(153)

                  2 vendor/predis/predis/src/Connection/Aggregate/RedisCluster.php(550):PredisConnectionAggregateRedisCluster->getConnection(Object(PredisCommandStringSetExpire))

                  3 vendor/predis/predis/src/Connection/Aggregate/RedisCluster.php(593):PredisConnectionAggregateRedisCluster->retryCommandOnFailure(Object(PredisCommandStringSetExpire),'執行命令')

                  4 vendor/predis/predis/src/Client.php(331): PredisConnectionAggregateRedisCluster->executeCommand(Object(PredisCommandStringSetExpire))

                  5 vendor/predis/predis/src/Client.php(314): PredisClient->executeCommand(Object(PredisCommandStringSetExpire))

                  6 vendor/laravel/framework/src/Illuminate/Redis/Connections/Connection.php(96):PredisClient->__call('setex', Array)

                  7 vendor/laravel/framework/src/Illuminate/Redis/Connections/Connection.php(108):IlluminateRedisConnectionsConnection->command('setex', Array)

                  8 vendor/laravel/framework/src/Illuminate/Cache/RedisStore.php(93): IlluminateRedisConnectionsConnection->__call('setex', Array)

                  9 vendor/laravel/framework/src/Illuminate/Cache/Repository.php(195): IlluminateCacheRedisStore->put('5rr44TBjIPEgJSx...','a:1:{s:6:"_flas...', 480)

                  10 vendor/laravel/framework/src/Illuminate/Session/CacheBasedSessionHandler.php(66):IlluminateCacheRepository->put('5rr44TBjIPEgJSx...','a:1:{s:6:"_flas...', 480)

                  11 vendor/laravel/framework/src/Illuminate/Session/Store.php(128): IlluminateSessionCacheBasedSessionHandler->write('5rr44TBjIPEgJSx...','a:1:{s:6:"_flas...')

                  12 vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php(87):IlluminateSessionStore->save()

                  13 vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(218):IlluminateSessionMiddlewareStartSession->terminate(Object(IlluminateHttpRequest),對象(IlluminateHttpResponse))

                  14 vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(189):IlluminateFoundationHttpKernel->terminateMiddleware(Object(IlluminateHttpRequest),對象(IlluminateHttpResponse))

                  15 public/index.php(58): IlluminateFoundationHttpKernel->terminate(Object(IlluminateHttpRequest),對象(IlluminateHttpResponse))

                  16 {main}

                  我使用的技術棧:

                  • PHP7.0
                  • Laravel5.5
                  • 操作系統(Debian GNU/Linux 9.6 (stretch)),9.6 版

                  我在 config/database.php 中嘗試了以下配置:

                  redis=>['客戶' =>'predis','選項' =>['集群' =>'redis',],'集群' =>['默認' =>[['主機' =>環境('REDIS_CLUSTER_HOST','本地主機'),'密碼' =>env('REDIS_CLUSTER_PASSWORD', null),'端口' =>環境('REDIS_CLUSTER_PORT',6379),'數據庫' =>0,],],'緩存' =>[['主機' =>環境('REDIS_CLUSTER_HOST','本地主機'),'密碼' =>env('REDIS_CLUSTER_PASSWORD', null),'端口' =>環境('REDIS_CLUSTER_PORT',6379),'數據庫' =>0,],],]]

                  我也試過 timeout => 0|5|60 但每次我都遇到同樣的錯誤.

                  任何幫助將不勝感激!

                  解決方案

                  這在我們的環境中起作用:

                   'redis' =>['集群' =>真的,'客戶' =>'predis','選項' =>['集群' =>'redis','參數' =>['方案' =>env('REDIS_SCHEME', 'tcp'),'主機' =>環境('REDIS_HOST','本地主機'),'密碼' =>env('REDIS_PASSWORD', null),'端口' =>環境('REDIS_PORT',6379),'數據庫' =>0,'超時' =>15、],],'集群' =>['默認' =>['方案' =>env('REDIS_SCHEME', 'tcp'),'主機' =>環境('REDIS_HOST','本地主機'),'密碼' =>env('REDIS_PASSWORD', null),'端口' =>環境('REDIS_PORT',6379),'數據庫' =>0,'超時' =>15、],],],

                  基于此處找到的信息:https://github.com/nrk/predis/issues/480 - 但還需要復制選項中的所有默認"配置值 -> 參數組

                  REDIS_HOST,指向 AWS elasticache 的 redis 集群中的配置端點.

                  I've setup redis-cluster on Amazon ElastiCache for cache, using Laravel 5.5 and Predis package, I get the following error.

                  PredisClientException: No connections available in the pool in vendor/predis/predis/src/Connection/Aggregate/RedisCluster.php:337 
                  

                  Trace: PredisClientException: No connections available in the pool in vendor/predis/predis/src/Connection/Aggregate/RedisCluster.php:337

                  Stack trace:

                  0 vendor/predis/predis/src/Connection/Aggregate/RedisCluster.php(411): PredisConnectionAggregateRedisCluster->guessNode(153)

                  1 vendor/predis/predis/src/Connection/Aggregate/RedisCluster.php(388): PredisConnectionAggregateRedisCluster->getConnectionBySlot(153)

                  2 vendor/predis/predis/src/Connection/Aggregate/RedisCluster.php(550): PredisConnectionAggregateRedisCluster->getConnection(Object(PredisCommandStringSetExpire))

                  3 vendor/predis/predis/src/Connection/Aggregate/RedisCluster.php(593): PredisConnectionAggregateRedisCluster->retryCommandOnFailure(Object(PredisCommandStringSetExpire), 'executeCommand')

                  4 vendor/predis/predis/src/Client.php(331): PredisConnectionAggregateRedisCluster->executeCommand(Object(PredisCommandStringSetExpire))

                  5 vendor/predis/predis/src/Client.php(314): PredisClient->executeCommand(Object(PredisCommandStringSetExpire))

                  6 vendor/laravel/framework/src/Illuminate/Redis/Connections/Connection.php(96): PredisClient->__call('setex', Array)

                  7 vendor/laravel/framework/src/Illuminate/Redis/Connections/Connection.php(108): IlluminateRedisConnectionsConnection->command('setex', Array)

                  8 vendor/laravel/framework/src/Illuminate/Cache/RedisStore.php(93): IlluminateRedisConnectionsConnection->__call('setex', Array)

                  9 vendor/laravel/framework/src/Illuminate/Cache/Repository.php(195): IlluminateCacheRedisStore->put('5rr44TBjIPEgJSx...', 'a:1:{s:6:"_flas...', 480)

                  10 vendor/laravel/framework/src/Illuminate/Session/CacheBasedSessionHandler.php(66): IlluminateCacheRepository->put('5rr44TBjIPEgJSx...', 'a:1:{s:6:"_flas...', 480)

                  11 vendor/laravel/framework/src/Illuminate/Session/Store.php(128): IlluminateSessionCacheBasedSessionHandler->write('5rr44TBjIPEgJSx...', 'a:1:{s:6:"_flas...')

                  12 vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php(87): IlluminateSessionStore->save()

                  13 vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(218): IlluminateSessionMiddlewareStartSession->terminate(Object(IlluminateHttpRequest), Object(IlluminateHttpResponse))

                  14 vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(189): IlluminateFoundationHttpKernel->terminateMiddleware(Object(IlluminateHttpRequest), Object(IlluminateHttpResponse))

                  15 public/index.php(58): IlluminateFoundationHttpKernel->terminate(Object(IlluminateHttpRequest), Object(IlluminateHttpResponse))

                  16 {main}

                  Technical stack I used:

                  • PHP7.0
                  • Laravel5.5
                  • OS (Debian GNU/Linux 9.6 (stretch)), Release 9.6

                  I tried the following configs in config/database.php:

                  redis=> [
                  'client'  => 'predis',
                          'options' => [
                              'cluster' => 'redis',
                          ],
                          'clusters' => [
                              'default' => [
                                  [
                                      'host' => env('REDIS_CLUSTER_HOST', 'localhost'),
                                      'password' => env('REDIS_CLUSTER_PASSWORD', null),
                                      'port' => env('REDIS_CLUSTER_PORT', 6379),
                                      'database' => 0,
                                  ],
                              ],
                              'cache' => [
                                  [
                                      'host' => env('REDIS_CLUSTER_HOST', 'localhost'),
                                      'password' => env('REDIS_CLUSTER_PASSWORD', null),
                                      'port' => env('REDIS_CLUSTER_PORT', 6379),
                                      'database' => 0,
                                  ],
                              ],
                          ]
                  ]
                  

                  I also tried with timeout => 0|5|60 but every time I get the same error.

                  Any help would be highly appreciated!

                  解決方案

                  This is working in in our env:

                      '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,
                               ],
                           ],
                       ],
                  

                  Based on info found here: https://github.com/nrk/predis/issues/480 - but needed to also replicate all 'default' config values in the options -> parameters group

                  REDIS_HOST, is pointing to the configuration endpoint in AWS elasticache's redis cluster.

                  這篇關于帶有 laravel 5.5 的 Predis“Aggregate/RedisCluster.php:337 中的池中沒有可用連接"的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

                  【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

                  相關文檔推薦

                  Deadlock exception code for PHP, MySQL PDOException?(PHP、MySQL PDOException 的死鎖異常代碼?)
                  PHP PDO MySQL scrollable cursor doesn#39;t work(PHP PDO MySQL 可滾動游標不起作用)
                  PHP PDO ODBC connection(PHP PDO ODBC 連接)
                  Using PDO::FETCH_CLASS with Magic Methods(使用 PDO::FETCH_CLASS 和魔術方法)
                  php pdo get only one value from mysql; value that equals to variable(php pdo 只從 mysql 獲取一個值;等于變量的值)
                  MSSQL PDO could not find driver(MSSQL PDO 找不到驅動程序)

                  <small id='9Whwo'></small><noframes id='9Whwo'>

                  <i id='9Whwo'><tr id='9Whwo'><dt id='9Whwo'><q id='9Whwo'><span id='9Whwo'><b id='9Whwo'><form id='9Whwo'><ins id='9Whwo'></ins><ul id='9Whwo'></ul><sub id='9Whwo'></sub></form><legend id='9Whwo'></legend><bdo id='9Whwo'><pre id='9Whwo'><center id='9Whwo'></center></pre></bdo></b><th id='9Whwo'></th></span></q></dt></tr></i><div class="w2ski2o" id='9Whwo'><tfoot id='9Whwo'></tfoot><dl id='9Whwo'><fieldset id='9Whwo'></fieldset></dl></div>

                    <tbody id='9Whwo'></tbody>
                  • <bdo id='9Whwo'></bdo><ul id='9Whwo'></ul>
                    <tfoot id='9Whwo'></tfoot>
                          1. <legend id='9Whwo'><style id='9Whwo'><dir id='9Whwo'><q id='9Whwo'></q></dir></style></legend>
                            主站蜘蛛池模板: 美能达分光测色仪_爱色丽分光测色仪-苏州方特电子科技有限公司 | 电脑刺绣_绣花厂家_绣花章仔_织唛厂家-[源欣刺绣]潮牌刺绣打版定制绣花加工厂家 | 中图网(原中国图书网):网上书店,尾货特色书店,30万种特价书低至2折! | 电动不锈钢套筒阀-球面偏置气动钟阀-三通换向阀止回阀-永嘉鸿宇阀门有限公司 | 道达尔润滑油-食品级润滑油-道达尔导热油-合成导热油,深圳道达尔代理商合-深圳浩方正大官网 | 硅胶管挤出机厂家_硅胶挤出机生产线_硅胶条挤出机_臣泽智能装备 贵州科比特-防雷公司厂家提供贵州防雷工程,防雷检测,防雷接地,防雷设备价格,防雷产品报价服务-贵州防雷检测公司 | 螺杆真空泵_耐腐蚀螺杆真空泵_水环真空泵_真空机组_烟台真空泵-烟台斯凯威真空 | 水环真空泵厂家,2bv真空泵,2be真空泵-淄博真空设备厂 | 环球电气之家-中国专业电气电子产品行业服务网站! | 雨水收集系统厂家-雨水收集利用-模块雨水收集池-徐州博智环保科技有限公司 | 股票入门基础知识_股票知识_股票投资大师_格雷厄姆网 | 双效节能浓缩器-热回流提取浓缩机组-温州市利宏机械 | 小型手持气象站-空气负氧离子监测站-多要素微气象传感器-山东天合环境科技有限公司 | 水性绝缘漆_凡立水_绝缘漆树脂_环保绝缘漆-深圳维特利环保材料有限公司 | 防火板_饰面耐火板价格、厂家_品牌认准格林雅 | 浙江建筑资质代办_二级房建_市政_电力_安许_劳务资质办理公司 | 订做不锈钢_不锈钢定做加工厂_不锈钢非标定制-重庆侨峰金属加工厂 | 网架支座@球铰支座@钢结构支座@成品支座厂家@万向滑动支座_桥兴工程橡胶有限公司 | 精密五金冲压件_深圳五金冲压厂_钣金加工厂_五金模具加工-诚瑞丰科技股份有限公司 | 冷柜风机-冰柜电机-罩极电机-外转子风机-EC直流电机厂家-杭州金久电器有限公司 | 上海电子秤厂家,电子秤厂家价格,上海吊秤厂家,吊秤供应价格-上海佳宜电子科技有限公司 | 建筑工程资质合作-工程资质加盟分公司-建筑资质加盟 | 船用锚链|专业锚链生产厂家|安徽亚太锚链制造有限公司 | 防爆大气采样器-防爆粉尘采样器-金属粉尘及其化合物采样器-首页|盐城银河科技有限公司 | 信阳市建筑勘察设计研究院有限公司 | 周口市风机厂,周鼓风机,河南省周口市风机厂 | 电动高尔夫球车|电动观光车|电动巡逻车|电动越野车厂家-绿友机械集团股份有限公司 | 自动气象站_气象站监测设备_全自动气象站设备_雨量监测站-山东风途物联网 | 利浦顿蒸汽发生器厂家-电蒸汽发生器/燃气蒸汽发生器_湖北利浦顿热能科技有限公司官网 | 智能监控-安防监控-监控系统安装-弱电工程公司_成都万全电子 | 单级/双级旋片式真空泵厂家,2xz旋片真空泵-浙江台州求精真空泵有限公司 | 合景一建-无尘车间设计施工_食品医药洁净车间工程装修总承包公司 | 云南标线|昆明划线|道路标线|交通标线-就选云南云路施工公司-云南云路科技有限公司 | 天津试验仪器-电液伺服万能材料试验机,恒温恒湿标准养护箱,水泥恒应力压力试验机-天津鑫高伟业科技有限公司 | 蒸压釜-陶粒板隔墙板蒸压釜-山东鑫泰鑫智能装备有限公司 | 模具硅橡胶,人体硅胶,移印硅胶浆厂家-宏图硅胶科技 | 河南彩印编织袋,郑州饲料编织袋定制,肥料编织袋加工厂-盛军塑业 河南凯邦机械制造有限公司 | LZ-373测厚仪-华瑞VOC气体检测仪-个人有毒气体检测仪-厂家-深圳市深博瑞仪器仪表有限公司 | 纯化水设备-EDI-制药-实验室-二级反渗透-高纯水|超纯水设备 | 懂研帝_专业SCI论文润色机构_SCI投稿发表服务公司 | 网站seo优化_seo云优化_搜索引擎seo_启新网络服务中心 |