php 网关超时:网关没有收到上游服务器的及时响应
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/20471736/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Gateway Time-out:The gateway did not receive a timely response from the upstream server
提问by Harish Singh
I am sending 300 newsletter at a time with a url, after 2 min it refresh itself again to send next 300 at so on.
我一次发送 300 份时事通讯,带有一个 url,2 分钟后它会再次刷新以发送下 300 份,依此类推。
But I am getting this error:
但我收到此错误:
Gateway Time-out
The gateway did not receive a timely response from the upstream server or application.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
网关超时
网关没有收到来自上游服务器或应用程序的及时响应。
此外,在尝试使用 ErrorDocument 处理请求时遇到 404 Not Found 错误。
I have set max execution to 3600
我已将最大执行设置为 3600
ini_set('max_execution_time', 3600);
But I am regularly getting same error. Please help me to find out the solution.
但我经常遇到同样的错误。请帮我找出解决方案。
回答by Mario Radomanana
I encountered the same problem and I used ini_set('default_socket_timeout', 6000);to fix it.
http://php.net/manual/en/filesystem.configuration.php#ini.default-socket-timeout
我遇到了同样的问题,我曾经ini_set('default_socket_timeout', 6000);修复过它。
http://php.net/manual/en/filesystem.configuration.php#ini.default-socket-timeout
回答by Julio Martinez
if the problem is coming from sql sentence, is a server's processing the long query try to optimize the SQL Sentence
如果问题来自 sql 语句,则是服务器处理长查询尝试优化 SQL 语句
回答by damoncloudflare
"Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request."
“此外,在尝试使用 ErrorDocument 处理请求时遇到 404 Not Found 错误。”
This would indicate something is not configured properly on the server.
这表明服务器上的某些内容未正确配置。
Can't follow why you think this is a CloudFlare issue right now (from the tag). Are you getting a CloudFlare error messageat all?
无法理解为什么您现在认为这是 CloudFlare 问题(来自标签)。您是否收到CloudFlare 错误消息?

