Environment Introduction
Server: centos6.5
Service: Nginx Proxy
Problem Description:
The development environment project of the pressure measurement development colleague It's okay, but the line machine hit%50, a lot of 502
Some PHP pages do not open, the page prompts the gateway timeout, and then find the log prompt as follows
2015/09/19 14:00:30 [ERROR] 1811#0: *319 upstream timed out (110:connection timed off) While reading response headers from Upstream, client:58.38.218.159, server:www.iserver.com, request: "get/invrenjie/image_new/myfiona/120913/my-1263/ Mins021_950.jpg http/1.1 ", Upstream:" Http://server:80/invrenjie/image_new/myfiona/120913/MY-1263/mins021_950.jpg ", Host:" Www.server.com "
Workaround:
The reason is that the time-out of Nginx proxy is too short
Proxy_connect_timeout 60;
Proxy_read_timeout 600;
Proxy_send_timeout 600;
Change to
Proxy_connect_timeout 600;
Proxy_read_timeout 600;
Proxy_send_timeout 600;
Then restart the Nginx
Pressure test 502 Log error upstream timed out (110:connection timed out)