简体   繁体   中英

Why Nginx cuts long responses from Node.js?

When I access Node.js directly (https:// domain.com:81) I get the whole response. 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.

Config file

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

EDIT: It returns no more than 16kB. The whole response has over 160kB.

NGINX DEBUG FILE: https://www.dropbox.com/s/4689ch6lonxsqrn/nginx.log

SOLVED: The problem was with https://domain.com:81 . If I set only http:// it works fine.

Have you tried with proxy_buffering on? Maybe node is taking to long to answer and nginx stops reading. Try increasing the proxy_read_timeout (default is 60s).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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