我有一个 java servlet 环境,它故意保持一个 http 连接打开并向客户端发送数据。这个连接在 50 秒后断开,我尝试了 nginx.conf 文件中的不同设置,但这些设置都不起作用。
我收到了这个错误。
上游读取响应标头时上游超时(110:连接超时),客户端:{某些 IP},服务器:,请求:“GET /{某些路径} HTTP/1.1”,上游:“http://127.0.0.1:5000/",主机:“sadfdsa.us-west-1.elb.amazonaws.com”
答案1
Syntax: proxy_send_timeout time;
Default: proxy_send_timeout 60s;
Context: http, server, location
The timeout is set only between two successive write operations, not for the transmission of the whole request.
Syntax: proxy_read_timeout time;
Default: proxy_read_timeout 60s;
Context: http, server, location
The timeout is set only between two successive read operations, not for the transmission of the whole response.
编辑这些内容显然对提问者有帮助。