httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From André Warnier ...@ice-sa.com>
Subject Re: [users@httpd] apache 2.2 and fastcgi 2.4.6
Date Tue, 21 Apr 2009 22:21:48 GMT
root@menkisys.net wrote:
>   MaxKeepAliveRequests is 60
>   KeepAliveTimeout is 3
> 
I don't know fastcgi at all, so I have no idea if something at that 
level explains your symptoms.

But why don't you try to reduce MaxKeepAliveRequests to, for example,

    MaxKeepAliveRequests 5

or whatever number corresponds more or less to the average number of 
links to objects that must be displayed at the same time, embedded in 
the same html response page.

Reasoning :
- you have a fast server.
- nowadays, the "cost" of establishing a new TCP connection is not so 
big anymore, relatively, as it was some years ago.
- if you use keepalive connections, it means that between the first 
request, and the moment your keep-alive timeout kicks in, OR you have 
exhausted the maximum keepalive requests, you keep one Apache 
child/thread busy with one single browser connection, whether there are 
more requests or not.

In the worst case, imagine a page without any embedded objects at all, 
just html text.
The browser opens a connection to the server, and sends the request for 
the page. The browser then waits for the response.  The server starts a 
child for this request.  The child processes the request and sends the 
response.  The browser receives and displays the response.
All of that takes 0.1 second.
Now the browser keeps the connection open, and the server also.
The same server child now waits on that same connection, up to 3 seconds 
in total (your timeout setting), for additional browser requests which 
never come.
Only after 3 seconds is that child free again for other requests from 
other browsers.

Worth a try ?

Maybe another thing to check : what is the CPU percentage used on your 
server ?  Try "top".

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


Mime
View raw message