You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Andy Yang <ay...@yahoo.com> on 2002/11/19 17:08:00 UTC

[users@httpd] Exact behaviour of KeepAliveTimeout

Hi All,

I was wondering if anyone can tell me the actual
behaviour of the KeepAliveTimeout directive.

All of the descriptions of this parameter I can find
say that it is the period of time between two CLIENT
HTTP REQUESTS. (Sorry, didn't mean to raise my voice)

So, given the following scenario:

A. Client issues HTTP request 1 (waits for response)
B. Apache receives request 1
C. Server does processing to generate dynamic response
D. Server sends response back to client
E. Client receives response
F. Client issues request 2
G. Apache receives request 2

Now, does the timeout period refer to the period
between B and G, or between D and G?

That is, as soon as Apache receives a request, the
clock starts ticking and after 15 seconds without
another request (the client is blocking), it will
close the connection.

In other words, in the case where server-side
processing takes longer than 15 seconds, the client
will not issue another request, and the connection
will be closed by Apache.

Any feedback?

Thanks in advance,
Andy

__________________________________________________
Do you Yahoo!?
Yahoo! Web Hosting - Let the expert host your site
http://webhosting.yahoo.com

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Exact behaviour of KeepAliveTimeout

Posted by Andy Yang <ay...@yahoo.com>.
--- Jacob Coby <jc...@listingbook.com> wrote:
> > A. Client issues HTTP request 1 (waits for
> response)
> > B. Apache receives request 1
> > C. Server does processing to generate dynamic
> response
> > D. Server sends response back to client
> > E. Client receives response
> > F. Client issues request 2
> > G. Apache receives request 2
> >
> > Now, does the timeout period refer to the period
> > between B and G, or between D and G?
> 
> I would assume between D and G as B-D and F-G are
> seperate connections.

Except that with HTTP 1.1, it is the same connection.
I should have said that the connection was a
persistent connection (which 1.1 connections are by
default.)
 
> > In other words, in the case where server-side
> > processing takes longer than 15 seconds, the
> client
> > will not issue another request, and the connection
> > will be closed by Apache.
> 
> That would seem less than desirable, as the idea is
> to have a client be served by the same process to 
> increase speed.  It's been my experience that
> as long as you continue making connections, the same
> process will serve them, until you wait longer than 
> the timeout.  At least that's how it would
> work if I programmed it :-)

I agree. I was trying to illustrate what the exact
"wait longer than the timeout" mechanism was. 

> You could install mod_status and watch what
> processes are serving your requests, and see when 
> they time out.

At this time, that's not quite practical - our setup
is actually a little more complicated than a straight
Apache install. However, we are setting some stuff up
to try and get a better sense of what is happening.
I'm just trying to get some hypotheses validated so
that we can understand what is *supposed* to be
happening.

Thanks,
Andy

__________________________________________________
Do you Yahoo!?
Yahoo! Web Hosting - Let the expert host your site
http://webhosting.yahoo.com

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Exact behaviour of KeepAliveTimeout

Posted by Jacob Coby <jc...@listingbook.com>.
> A. Client issues HTTP request 1 (waits for response)
> B. Apache receives request 1
> C. Server does processing to generate dynamic response
> D. Server sends response back to client
> E. Client receives response
> F. Client issues request 2
> G. Apache receives request 2
>
> Now, does the timeout period refer to the period
> between B and G, or between D and G?

I would assume between D and G as B-D and F-G are seperate connections.

> In other words, in the case where server-side
> processing takes longer than 15 seconds, the client
> will not issue another request, and the connection
> will be closed by Apache.

That would seem less than desirable, as the idea is to have a client be
served by the same process to increase speed.  It's been my experience that
as long as you continue making connections, the same process will serve
them, until you wait longer than the timeout.  At least that's how it would
work if I programmed it :-)

You could install mod_status and watch what processes are serving your
requests, and see when they time out.

-Jacob


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org