首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >增加504超时错误

增加504超时错误
EN

Stack Overflow用户
提问于 2012-05-30 05:25:23
回答 2查看 107.3K关注 0票数 75

有没有什么方法可以使错误504网关超时时间更长?如果是,如何更改该文件,以及在何处更改它。我在centos 6上使用nginx

EN

回答 2

Stack Overflow用户

发布于 2012-06-01 21:00:59

根据您拥有的网关类型,您应该使用以下内容:

代码语言:javascript
复制
proxy_read_timeout 600s;

检查文档:http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_read_timeout

票数 127
EN

Stack Overflow用户

发布于 2020-12-29 15:53:22

如果是fastcgi超时错误,则需要增加fastcgi_read_timeout

代码语言:javascript
复制
# /etc/nginx/conf.d/example.com.conf
server {

    location ~ \.(php)$ {
        fastcgi_pass unix:/var/run/php74-example.com.sock;
        fastcgi_read_timeout 300s;

错误日志)上游超时

代码语言:javascript
复制
# 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手册)

代码语言:javascript
复制
Default: fastcgi_read_timeout 60s;
Context: http, server, location

http://nginx.org/en/docs/http/ngx_http_fastcgi_module.html#fastcgi_read_timeout

在Chrome DevTools中调用运行时间超过60秒的脚本的结果。

默认60秒

fastcgi_read_timeout 300s

票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/10806928

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档