现状:nginx 代理某api 接口,业务是统计一年数据,计算量较大,耗时2分钟,导致页面返回 504
http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_read_timeout
Syntax: | proxy_read_timeout |
---|---|
Default: |
proxy_read_timeout 60s; |
Context: | http , server , location |
Defines a timeout for reading a response from the proxied server. The timeout is set only between two successive read operations, not for the transmission of the whole response. If the proxied server does not transmit anything within this time, the connection is closed.
http://nginx.org/en/docs/http/ngx_http_fastcgi_module.html#fastcgi_read_timeout
Syntax: | fastcgi_read_timeout |
---|---|
Default: |
fastcgi_read_timeout 60s; |
Context: | http , server , location |
Defines a timeout for reading a response from the FastCGI server. The timeout is set only between two successive read operations, not for the transmission of the whole response. If the FastCGI server does not transmit anything within this time, the connection is closed.
proxy 走代理,fastcgi 不走代理。试着把proxy_read_timeout 调整为180s ,可以了
标签:http,read,server,proxy,timeout,504,Gateway,fastcgi,out From: https://www.cnblogs.com/zno2/p/17022064.html