Welcome! Log In Create A New Profile

Advanced

Re: Logs in wrong order

Maxim Dounin
May 09, 2011 07:10AM
Hello!

On Mon, May 09, 2011 at 06:52:28AM -0400, davidkazuhiro wrote:

> When I hit the nginx server with a very rapid succession of requests
> from multiple clients, the logs will be out of order. For example, the
> log times would appear like this:
>
> ... 18:10:11 ...
> ... 18:10:11 ...
> ... 18:10:11 ...
> ... 18:10:12 ...
> ... 18:10:11 ...
> ... 18:10:12 ...
> ... 18:10:11 ...
> ... 18:10:12 ...
> ... 18:10:12 ...
> ... 18:10:12 ...
>
> Why would this be?

Time in different nginx worker processes may be slightly different
as nginx only updates time once per event loop iteration (or even
less frequently if timer_resolution set). This in turn results in
out-of-order times in logs you see when requests from different
workers are logged.

Similar effect may be also seen when using log buffering (though
in this case you'll see blocks with successive times up to log
buffer size, not individual lines).

Maxim Dounin

_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx
Subject Author Posted

Logs in wrong order

davidkazuhiro May 09, 2011 06:52AM

Re: Logs in wrong order

Maxim Dounin May 09, 2011 07:10AM

Re: Logs in wrong order

davidkazuhiro May 09, 2011 08:13AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 302
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready