most of value of $request_time is 0.000
mdounin at mdounin.ru
Wed Mar 25 20:00:49 UTC 2015
On Wed, Mar 25, 2015 at 11:55:14AM +0800, baipeng wrote:
> Our version of nginx is nginx/1.0.8 and we have write a third
> party module to handle the http request. Because the process
> model of our third party module is synchronous so the nginx
> worker process will be blocked until one request accomplished.
> The average time cost of one request is about 50ms.But After we
> set $request_time in nginx.conf, the most of the value of
> $request_time is 0.000.Even we set timer_resolution 1ms in
> nginx.conf most of value of $request_time is still 0.000.
> Are there anyone can tell me why it occured?
Time as seen by nginx is only updated once per event loop
iteration, so if you block processing for a while and then
finalize the request - this time won't be visible in
The timer_resolution may change things on some platforms, but it's
not designed to do so. Instead, it's to _reduce_ timer resolution
compared to what nginx does by default, see
More information about the nginx