Forum: NGINX $request_time in logging

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
88098c5295e0de78509b0febd92eb646?d=identicon&s=25 Marlon de Boer (Guest)
on 2008-12-02 09:51
(Received via mailing list)
Hi all,

Does $request_time includes the socket operations (accept(), read(),
send() and close()) or only the local processing time?

I'm curious because I wrote some rrdtool stats based on this log feature
and seeing some long timeouts.

Regards
Marlon
5640e332954fc0006aea97a155ce0afd?d=identicon&s=25 Igor Sysoev (Guest)
on 2008-12-02 10:16
(Received via mailing list)
On Tue, Dec 02, 2008 at 09:40:10AM +0100, Marlon de Boer wrote:

> Does $request_time includes the socket operations (accept(), read(),
> send() and close()) or only the local processing time?
>
> I'm curious because I wrote some rrdtool stats based on this log feature
> and seeing some long timeouts.

$request_time is time between first read() and last write()/sendfile().
The time between accept() and first read() is not accounted.
88098c5295e0de78509b0febd92eb646?d=identicon&s=25 Marlon de Boer (Guest)
on 2008-12-02 10:56
(Received via mailing list)
Igor Sysoev wrote:
> $request_time is time between first read() and last write()/sendfile().
> The time between accept() and first read() is not accounted.

Ok, just to be sure, this will include the time spend reading the
request from the client and sending the actual data to the client?

Regards
Marlon
5640e332954fc0006aea97a155ce0afd?d=identicon&s=25 Igor Sysoev (Guest)
on 2008-12-02 11:01
(Received via mailing list)
On Tue, Dec 02, 2008 at 10:49:19AM +0100, Marlon de Boer wrote:

> Igor Sysoev wrote:
> > $request_time is time between first read() and last write()/sendfile().
> > The time between accept() and first read() is not accounted.
>
> Ok, just to be sure, this will include the time spend reading the
> request from the client and sending the actual data to the client?

Yes. However, as to sending nginx pass data to kernel only and can not
control when the data will be recieved by a client.
This topic is locked and can not be replied to.