简体   繁体   English

为什么Nginx削减了Node.js的长响应?

[英]Why Nginx cuts long responses from Node.js?

When I access Node.js directly (https:// domain.com:81) I get the whole response. 当我直接访问Node.js(https:// domain.com:81)时,我得到了整个响应。 When I go through the Nginx (https:// domain.com/eval/something) I don't get the whole response in the case that there is a quite a big response. 当我浏览Nginx(https://domain.com/eval/something)时,如果有很大的回应,我不会得到完整的回应。

Config file 配置文件

location ~ ^/eval/ {
    proxy_buffering    off;
    proxy_pass         https://domain.com:81;
}

EDIT: It returns no more than 16kB. 编辑:返回不超过16kB。 The whole response has over 160kB. 整个响应超过160kB。

NGINX DEBUG FILE: https://www.dropbox.com/s/4689ch6lonxsqrn/nginx.log NGINX调试文件: https ://www.dropbox.com/s/4689ch6lonxsqrn/nginx.log

SOLVED: The problem was with https://domain.com:81 . 已解决:问题出在https://domain.com:81 If I set only http:// it works fine. 如果我只设置http://那么效果很好。

Have you tried with proxy_buffering on? 您是否尝试过proxy_buffering Maybe node is taking to long to answer and nginx stops reading. 也许节点要花很长时间才能回答,而nginx停止读取。 Try increasing the proxy_read_timeout (default is 60s). 尝试增加proxy_read_timeout (默认值为60s)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM