You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Arthur Kreitman <ar...@congruent.com> on 2006/11/14 20:18:01 UTC

[users@httpd] Where are all the accepts?

This is with  Apache 2.2 on Windows XP with mod_isapi (the 416293
update).  

 

The usual way I thought http requests are serviced are as follows:

 

The server does a listen on a socket to attach it to the port (usually
port 80)

 

The server waits on a select, when the select is satisfied server does
an accept on the socket and away we go

 

 

When I trace through what apache actually does, when a specific client
sends lots of requests, I see just the occasional accept.  What am I
missing?

 

Art


Re: [users@httpd] Where are all the accepts?

Posted by "William A. Rowe, Jr." <wr...@rowe-clan.net>.
Arthur Kreitman wrote:
> The client is actually a WinInet (Microsoft's magic internet library)
> application.   Its sets INTERNET_FLAG_EXISTING_CONNECT but doesn't set
> INTERNET_FLAG_KEEP_CONNECTION (the keep alive flag). 

In HTTP 1.0 keep alive didn't exist, then it did, but defaulted to false.

With HTTP 1.1 keep alive is the default behavior, unless the user or server
explicitly force it off.

---------------------------------------------------------------------
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] Where are all the accepts?

Posted by Sander Temme <sc...@apache.org>.
On Nov 14, 2006, at 12:18 PM, Arthur Kreitman wrote:

> It shouldn't be, I suspect that its on the apache side.   Is there any
> way that I can configure (or change) Apache to close the connection
> after the http response has been sent?

http://httpd.apache.org/docs/trunk/mod/core.html#keepalive

KeepAlive off

Should do the trick.

S.

-- 
sctemme@apache.org            http://www.temme.net/sander/
PGP FP: 51B4 8727 466A 0BC3 69F4  B7B8 B2BE BC40 1529 24AF



RE: [users@httpd] Where are all the accepts?

Posted by Arthur Kreitman <ar...@congruent.com>.
It shouldn't be, I suspect that its on the apache side.   Is there any
way that I can configure (or change) Apache to close the connection
after the http response has been sent?



> -----Original Message-----
> From: Sander Temme [mailto:sctemme@apache.org]
> Sent: Tuesday, November 14, 2006 12:00 PM
> To: users@httpd.apache.org
> Subject: Re: [users@httpd] Where are all the accepts?
> 
> 
> On Nov 14, 2006, at 11:44 AM, Arthur Kreitman wrote:
> 
> > The client is actually a WinInet (Microsoft's magic internet
library)
> > application.   Its sets INTERNET_FLAG_EXISTING_CONNECT but doesn't
set
> > INTERNET_FLAG_KEEP_CONNECTION (the keep alive flag).
> 
> That doesn't tell me anything, since I don't know this library. Does
> it attempt to re-use existing TCP connections for subsequent HTTP
> requests? If so, that is probably why you are seeing so few accept()
> returns.
> 
> S.
> 
> --
> sctemme@apache.org            http://www.temme.net/sander/
> PGP FP: 51B4 8727 466A 0BC3 69F4  B7B8 B2BE BC40 1529 24AF
> 


---------------------------------------------------------------------
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] Where are all the accepts?

Posted by Sander Temme <sc...@apache.org>.
On Nov 14, 2006, at 11:44 AM, Arthur Kreitman wrote:

> The client is actually a WinInet (Microsoft's magic internet library)
> application.   Its sets INTERNET_FLAG_EXISTING_CONNECT but doesn't set
> INTERNET_FLAG_KEEP_CONNECTION (the keep alive flag).

That doesn't tell me anything, since I don't know this library. Does  
it attempt to re-use existing TCP connections for subsequent HTTP  
requests? If so, that is probably why you are seeing so few accept()  
returns.

S.

-- 
sctemme@apache.org            http://www.temme.net/sander/
PGP FP: 51B4 8727 466A 0BC3 69F4  B7B8 B2BE BC40 1529 24AF



RE: [users@httpd] Where are all the accepts?

Posted by Arthur Kreitman <ar...@congruent.com>.
The client is actually a WinInet (Microsoft's magic internet library)
application.   Its sets INTERNET_FLAG_EXISTING_CONNECT but doesn't set
INTERNET_FLAG_KEEP_CONNECTION (the keep alive flag). 

> -----Original Message-----
> From: Sander Temme [mailto:sctemme@apache.org]
> Sent: Tuesday, November 14, 2006 11:25 AM
> To: users@httpd.apache.org
> Subject: Re: [users@httpd] Where are all the accepts?
> 
> Hey Arthur,
> 
> On Nov 14, 2006, at 11:18 AM, Arthur Kreitman wrote:
> 
> > When I trace through what apache actually does, when a specific
> > client sends lots of requests, I see just the occasional accept.
> > What am I missing?
> 
> Do you have HTTP 1.1 KeepAlive enabled on the server? Turning that
> off will radically increase the number of TCP connections the server
> will have to accept.
> 
> What client are you using? It may use KeepAlive by default, but
> sometimes it won't. For instance, ab only uses KeepAlive if you pass
> it the -k flag.
> 
> S.
> 
> --
> sctemme@apache.org            http://www.temme.net/sander/
> PGP FP: 51B4 8727 466A 0BC3 69F4  B7B8 B2BE BC40 1529 24AF
> 
> 
> 
> ---------------------------------------------------------------------
> 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


---------------------------------------------------------------------
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] Where are all the accepts?

Posted by Sander Temme <sc...@apache.org>.
Hey Arthur,

On Nov 14, 2006, at 11:18 AM, Arthur Kreitman wrote:

> When I trace through what apache actually does, when a specific  
> client sends lots of requests, I see just the occasional accept.   
> What am I missing?

Do you have HTTP 1.1 KeepAlive enabled on the server? Turning that  
off will radically increase the number of TCP connections the server  
will have to accept.

What client are you using? It may use KeepAlive by default, but  
sometimes it won't. For instance, ab only uses KeepAlive if you pass  
it the -k flag.

S.

-- 
sctemme@apache.org            http://www.temme.net/sander/
PGP FP: 51B4 8727 466A 0BC3 69F4  B7B8 B2BE BC40 1529 24AF



---------------------------------------------------------------------
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