<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                合規國際互聯網加速 OSASE為企業客戶提供高速穩定SD-WAN國際加速解決方案。 廣告
                ## Mix\Redis\Redis::class 基于 phpredis 封裝,內置連接池,可獨立使用。 ## 組件 使用 [composer]([https://www.phpcomposer.com/](https://www.phpcomposer.com/)) 安裝: ~~~ composer require mix/redis ~~~ ## 依賴注入配置 - [manifest/beans/redis.php](https://github.com/mix-php/mix-skeleton/blob/master/manifest/beans/redis.php) > \>= v2.2.9 新增了 maxLifetime、waitTimeout 參數 ## 長連接超時問題 Redis 配置文件內的 `timeout` 參數,決定了 sleep 多長時間的連接會被主動 kill,正常情況下是需要用戶自己來處理連接超時的問題,但使用該組件,用戶不需要處理,組件底層已經幫你處理了。 - `maxLifetime` 連接因閑置被 mysql 主動 kill 連接時,連接會被重連,業務不受影響,但調度器依然還是會調度一個異常,如果想消除這個異常,配置該參數 < `timeout` 參數。 ## 獲取連接 - 直接調用方法獲取連接 ``` /** @var \Mix\Redis\Redis $redis */ $redis = context()->get('redis'); // get 方法內部將自動獲取連接,并執行方法返回結果 $value = $redis->get('foo'); ``` - 手動獲取連接 ``` /** @var \Mix\Redis\Redis $redis */ $redis = context()->get('redis'); $conn = $redis->borrow(); $conn = null; // 使用完后立即手動歸還連接,避免出現協程死鎖 ``` 當出現以下異常信息,很有可能就是協程死鎖導致 ~~~ PHP Fatal error: Swoole\Coroutine\Channel::close(): you must call Channel constructor first in /Users/***/worker-pool/src/AbstractWorker.php on line 96 Fatal error: Swoole\Coroutine\Channel::close(): you must call Channel constructor first in /Users/***/worker-pool/src/AbstractWorker.php on line 96 [2020-10-26 19:48:59 @61837.0] WARNING ~Channel (ERRNO 10003): channel is destroyed, 1 consumers will be discarded [2020-10-26 19:48:59 @61837.0] WARNING ~Channel (ERRNO 10003): channel is destroyed, 20 consumers will be discarded [2020-10-26 19:48:59 @61837.0] WARNING ~Channel (ERRNO 10003): channel is destroyed, 1 consumers will be discarded [2020-10-26 19:48:59 @61837.0] WARNING ~Channel (ERRNO 10003): channel is destroyed, 1 consumers will be discarded ~~~
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看