The difference between request_time and upstream_response_time for nginx optimization

A large number of the following logs appear in http://blog.sina.com.cn/s/blog_4f9fc6e10102uxib.html

error.log:

quote
2013/11/13 11:26:10 [info] 18382#0: *73 client closed connection while waiting for request, client: 192.168.32.43, server: 0.0.0.0:80


The request volume is very small, only 3 or 400 per minute, which is far below the threshold of the previous stress test. Many of the above clients are 127.0.0.1, and occasionally there are other IPs. I have tried switching keep-alive to no avail. What is the possible problem?

This problem usually occurs because the response time of your interface is too long, which exceeds the timeout setting set by the client. It is recommended to record $upstream_response_time $request_time in the nginx access log to see what the general request response time is. If it does take a long time, then optimize the code.

Solution: vi /opt/usr/nginx/1.4.0/conf/nginx.conf The
reason is that the timeout of nginx proxy is too short
proxy_connect_timeout 3;
proxy_read_timeout 30;
proxy_send_timeout 30;

change to

proxy_connect_timeout 600;
proxy_read_timeout 600;
proxy_send_timeout 600;

then Just restart nginx:

/opt/usr/nginx/1.4.0/sbin/nginx -s reload



http://www.cnblogs.com/tinywan/p/6534151.html
http://blog.csdn.net/cjfeii /article/details/51159496

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326391086&siteId=291194637