【问题标题】:Why am i getting error: recv() failed (104: Connection reset by peer) while reading response header from upstream during ajax request为什么我收到错误:recv() failed (104: Connection reset by peer) while reading response header from upstream during ajax request
【发布时间】:2017-03-18 12:57:18
【问题描述】:

我遇到了 ajax 问题。它总是在请求后 5 分钟停止工作。我不知道是什么原因造成的。我查看了很多页面以找到解决方案,但也没有提供好的解决方案。我能做什么?

【问题讨论】:

    标签: php ajax nginx server fastcgi


    【解决方案1】:

    您需要检查您在 /etc/php5/fpm/pool.d/www.conf 文件中的 request_terminate_timeout 行中设置的内容。我有:

    request_terminate_timeout = 300s

    这是因为它总是在 5 分钟后停止工作(300 秒 = 5 分钟)

    在我将其更改为request_terminate_timeout = 3600s 后,我的问题就消失了。我现在有 60 分钟的时间来完成我的 ajax 请求:)

    PS 请确保在该行之前删除;,因为它用于注释行。

    【讨论】:

      猜你喜欢
      • 2018-05-23
      • 1970-01-01
      • 2019-02-02
      • 2020-06-06
      • 2019-03-29
      • 2013-03-13
      • 2023-02-06
      • 2012-07-15
      • 2019-06-11
      相关资源
      最近更新 更多