<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>

                ThinkChat2.0新版上線,更智能更精彩,支持會話、畫圖、視頻、閱讀、搜索等,送10W Token,即刻開啟你的AI之旅 廣告
                # recv() failed ## 報錯內容: >2020/03/13 12:10:34 [error] 31720#0: *2661487 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: 67.229.103.26, server: www.dyhjw.com, request: "POST /api/getHqLastInfo HTTP/1.1", upstream: "fastcgi://unix:/tmp/php-cgi-56.sock:", host: "www.dyhjw.com" ## 說明: 之前解決過這個問題,現在這個問題又重現了。看了阿里云負載均衡常見問題,有了更清晰的認識,鏈接文章如下:[https://help.aliyun.com/knowledge\_detail/55207.html?spm=a2c4g.11174283.6.695.325e1192wftz5C](https://help.aliyun.com/knowledge_detail/55207.html?spm=a2c4g.11174283.6.695.325e1192wftz5C) ## 原因: `PHP`腳本執行時間處理超時,即如果`php-fpm`處理`PHP`腳本的時長超過了`Nginx`中`request_terminate_timeout`設置的值,就會出現`502 Bad Gateway`的錯誤,同時在` Nginx`日志中可以查看到如下錯誤記錄 >[error] 1760#0: *251777 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: xxx.xxx.xxx.xxx, server: localhost, request: “GET /timeoutmore.php HTTP/1.1”, upstream: “fastcgi://127.0.0.1:9000” ## 需要了解 參考文章:[https://blog.csdn.net/loophome/article/details/78604986](https://blog.csdn.net/loophome/article/details/78604986) ### 1、`php-fpm` 處理 `PHP`腳本時間,在哪里? 處理腳本的時間是:`max_execution_time` 位置在 `/www/server/php/56/etc/php.ini` ![](https://img.kancloud.cn/49/df/49df774aa546c13cb80c6e26ab83da56_621x215.png) ### 2、`nginx` 中的 `request_terminate_timeout` 的值是,在哪里? 答:`request_terminate_timeout` 配置在` php-fpm.conf` 中,位置在: `/www/server/php/56/etc/php-fpm.conf` 配置參數是: `request_terminate_timeout` 原先是`100`,我們更改為`300`: ![](https://img.kancloud.cn/c4/25/c425aa9e5827c65330e80187aac90988_446x473.png) ## 錯誤分析: 原因是: `max_execution_time=300` 執行時間大于 `request_terminate_timeout=100` 執行時間 一般可能執行時間都是小于100的,但當于100的話就報錯! ## 解決方法 1、`php.ini` 把 `max_execution_time` 值調大一些,由 `300`調整為 `600` 2、`php-fpm.conf` 把 `request_terminate_timeout` 值調大一些,由 `100` 調整為 `0` (PS:0為無限制!) ## 涉及命令 1、`vim /www/server/php/56/etc/php.ini` 查找 `max_execution_time` 2、`vim /www/server/php/56/etc/php-fpm.conf` 查看 `request_terminate_timeout` 3、重新啟動 `php5.6`
                  <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>

                              哎呀哎呀视频在线观看