Possible causes for request time taking twice as long as upstream response time

Zev Blut zblut at cerego.com
Fri Feb 4 09:23:11 MSK 2011


I am doing some performance analysis for one of our sites.
In the Nginx access_log, I record the $request_time and the 

While looking at these logs I can see that sometimes these numbers have 
a fairly large delta.
For example one request's request_time is 1.553 while the 
upstream_response_time is 0.864.

What are some of the potential causes for this large delta and is there 
anything I can do about it?

A few reasons I can think of may be:

* The requester is on a slow internet connection : Not much I can do 
about that

* Nginx is getting too many requests : Add more workers and or more 
Nginx servers



More information about the nginx mailing list