草庐IT

php - 为什么我收到错误 : recv() failed (104: Connection reset by peer) while reading response header from upstream during ajax request

coder 2024-01-03 原文

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

最佳答案

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

request_terminate_timeout = 300s

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

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

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

关于php - 为什么我收到错误 : recv() failed (104: Connection reset by peer) while reading response header from upstream during ajax request,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40426947/

有关php - 为什么我收到错误 : recv() failed (104: Connection reset by peer) while reading response header from upstream during ajax request的更多相关文章

随机推荐