有没有什么方法可以使错误504网关超时时间更长?如果是,如何更改该文件,以及在何处更改它。我在centos 6上使用nginx
发布于 2012-06-01 21:00:59
根据您拥有的网关类型,您应该使用以下内容:
proxy_read_timeout 600s;检查文档:http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_read_timeout
发布于 2020-12-29 15:53:22
如果是fastcgi超时错误,则需要增加fastcgi_read_timeout。
# /etc/nginx/conf.d/example.com.conf
server {
location ~ \.(php)$ {
fastcgi_pass unix:/var/run/php74-example.com.sock;
fastcgi_read_timeout 300s;错误日志)上游超时
# tail -f example.com.error.log
2020/12/29 14:51:42 [error] 30922#30922:
*9494 upstream timed out (110: Connection timed out) while reading response header from upstream,
...
upstream: "fastcgi://unix:/var/run/php74-example.com.sock",
...nginx手册)
Default: fastcgi_read_timeout 60s;
Context: http, server, locationhttp://nginx.org/en/docs/http/ngx_http_fastcgi_module.html#fastcgi_read_timeout
在Chrome DevTools中调用运行时间超过60秒的脚本的结果。
默认60秒

fastcgi_read_timeout 300s

https://stackoverflow.com/questions/10806928
复制相似问题