You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by ro...@menkisys.net on 2009/04/21 22:14:36 UTC

[users@httpd] apache 2.2 and fastcgi 2.4.6

  hello
   i have debian lenny 64bit lenny server with intel quadcore cpu and 4gb ram (fastcgi 2.4.6). i have about 1.4 tb traffic month on this server. my problem is the speed of fastcgi application. when i want the visit one website on my server somethimes i must wait about 4 seconds the view the site. after them the speed is better. you can try the visit these site and you will see somethimes you must wait some seconds the view the site: http://www.board2null.de . when i restart/reload the webserver everything ist going very fast for 30 minutes. after them the speed ist very bad again. please help me to solve the problem. is my configuration bad? i have many visitors per day: about 5000.... 

  hostnamelookups are OFF
  KeepAlive is On
  MaxKeepAliveRequests is 60
  KeepAliveTimeout is 3

  my fastcgi config:

  <IfModule mod_fastcgi.c>
          FastCgiWrapper On
          FastCgiIpcDir /var/lib/apache2/fastcgi2

          FastCgiConfig -minProcesses 60 \
                    -maxProcesses 900 \
                    -idle-timeout 80 \
                    -singleThreshold 100 \
                    -maxClassProcesses 10 \
                    -multiThreshold 100 \
                    -killInterval 20 \
                    -startDelay 5
                    # -autoUpdate \
                    # -pass-header HTTP_AUTHORIZATION

  Thanks


Re: [users@httpd] apache 2.2 and fastcgi 2.4.6

Posted by André Warnier <aw...@ice-sa.com>.
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


Re: [users@httpd] apache 2.2 and fastcgi 2.4.6

Posted by Brian Mearns <me...@gmail.com>.
On Tue, Apr 21, 2009 at 4:14 PM,  <ro...@menkisys.net> wrote:
>> hello
>>  i have debian lenny 64bit lenny server with intel quadcore cpu and 4gb
>> ram (fastcgi 2.4.6). i have about 1.4 tb traffic month on this server. my
>> problem is the speed of fastcgi application. when i want the visit one
>> website on my server somethimes i must wait about 4 seconds the view the
>> site. after them the speed is better. you can try the visit these site and
>> you will see somethimes you must wait some seconds the view the site:
>> http://www.board2null.de . when i restart/reload the webserver everything
>> ist going very fast for 30 minutes. after them the speed ist very bad again.
>> please help me to solve the problem. is my configuration bad? i have many
>> visitors per day: about 5000....
>>
>> hostnamelookups are OFF
>> KeepAlive is On
>> MaxKeepAliveRequests is 60
>> KeepAliveTimeout is 3
>> my fastcgi config:
>>
>> <IfModule mod_fastcgi.c>
>>         FastCgiWrapper On
>>         FastCgiIpcDir /var/lib/apache2/fastcgi2
>>
>>         FastCgiConfig -minProcesses 60 \
>>                   -maxProcesses 900 \
>>                   -idle-timeout 80 \
>>                   -singleThreshold 100 \
>>                   -maxClassProcesses 10 \
>>                   -multiThreshold 100 \
>>                   -killInterval 20 \
>>                   -startDelay 5
>>                   # -autoUpdate \
>>                   # -pass-header HTTP_AUTHORIZATION
>>
>> Thanks
>
>

If you're really operating as root, that could be the source of a lot
of your problems...

-- 
Feel free to contact me using PGP Encryption:
Key Id: 0x3AA70848
Available from: http://keys.gnupg.net

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