1.问题现象

通过nginx 访问 nodejs 访问特别慢。但是通过nodejs 直接访问速度很快响应。

2.日志错误

upstream timed out (10060: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond) while connecting to upstream

3.配置修改如下

location /jpaas {
proxy_set_header Host $host;
#proxy_pass http://192.168.3.225;
proxy_pass http://localhost:8002;
# 下面 为增加的配置
proxy_connect_timeout 1;
proxy_send_timeout 30;
proxy_read_timeout 60;
}

增加配置后,重启后,再访问速度很快了。