Nginx无法代理一个位置

我有一个像这样的nginx反向代理设置:

server { listen 5000 default_server; listen [::]:5000 default_server ipv6only=on; root /usr/share/nginx/html; index index.html index.htm; client_max_body_size 100m; large_client_header_buffers 4 40k; server_name localhostsecure; location / { proxy_pass https://app-address.com; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; } location /path/ { proxy_pass http://mypathaddress.com; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; } } 

问题是,有时候,/ path /没有被redirect,并导致超时。 实际的服务器没有问题,我可以从nginx服务器ping它,它的工作。 此外,根服务器继续工作。 重新启动nginx解决了这个问题,但我无法弄清楚为什么会发生这一切。 任何人有这个问题?

http://mypathaddress.com服务器在这个时间点需要很长时间才能响应,因此nginx会超时。 资源暂时耗尽并不妨碍服务器回复ping。 生成请求数据的应用程序软件失败。

您应该检查应用程序服务器的日志。