You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Damian Meyer <ap...@damianmeyer.com> on 2004/01/16 08:36:17 UTC

[users@httpd] Timeouts / responsiveness issues with Apache

Hi,

We have recently migrated from several individual Apache 1.3.x servers 
running around 1000 virtual sites each to a server farm with multiple 
servers (Apache/1.3.29) all capable of running all of the sites (about 
4000 in total).  The server farm is behind a load balancer running 
ldirectord from the LVS project.

The problem we are having is that every so often one of the web servers 
seems to go offline and either become very sluggish with responses or 
even times-out.  If it failed totally, ldirectord would notice and map 
it out, but it doesn't (usually).  After a few minutes of bad 
performance, it usually comes good, but it happens frequently enough to 
one or more of the web servers that it's causes noticeable glitches to 
our clients.

Also, and it may or may not be related, occasionally Apache dies totally 
(ie no live processes) and requires starting again.

Each server has 2GB of RAM.  Websites are a mix of flat HTML through to 
complicated PHP sites using MySQL connections (we've checked the 
database, it doesn't look like this is the problem.)

Does anyone have any idea what could be at issue here?  Does anyone have 
any experience with this sort of large-ish server farm to give us any 
feedback on configuration settings or other tuning parameters?  Any 
decent tuning documents on the web that take into account this type of 
scenario?

Kind regards
Damian Meyer



---------------------------------------------------------------------
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] Timeouts / responsiveness issues with Apache

Posted by Damian Meyer <ap...@damianmeyer.com>.
Timeout 300
MaxClients 1024
StartServers 5
MinSpareServers 5
MaxSpareServers 25
KeepAlive On
MaxKeepAliveRequests 200
KeepAliveTimeOut 15
MaxRequestsPerChild 10000

RLimitCPU 30 30
RLimitMem 25000000 30000000


ps or top report RSS between 25M and 33M

Kind regards
Damian

Matthew Shannon wrote:

>What are your settings for the following;
>StartServers        
>MinSpareServers      
>MaxSpareServers     
>MaxClients         
>MaxRequestsPerChild
>
>and, when you check the memory usage of an individual instance of the
>http daemon, how much memory is it using?
>
>-m
>
>On Thu, 2004-01-15 at 23:36, Damian Meyer wrote:
>  
>
>>Hi,
>>
>>We have recently migrated from several individual Apache 1.3.x servers 
>>running around 1000 virtual sites each to a server farm with multiple 
>>servers (Apache/1.3.29) all capable of running all of the sites (about 
>>4000 in total).  The server farm is behind a load balancer running 
>>ldirectord from the LVS project.
>>
>>The problem we are having is that every so often one of the web servers 
>>seems to go offline and either become very sluggish with responses or 
>>even times-out.  If it failed totally, ldirectord would notice and map 
>>it out, but it doesn't (usually).  After a few minutes of bad 
>>performance, it usually comes good, but it happens frequently enough to 
>>one or more of the web servers that it's causes noticeable glitches to 
>>our clients.
>>
>>Also, and it may or may not be related, occasionally Apache dies totally 
>>(ie no live processes) and requires starting again.
>>
>>Each server has 2GB of RAM.  Websites are a mix of flat HTML through to 
>>complicated PHP sites using MySQL connections (we've checked the 
>>database, it doesn't look like this is the problem.)
>>
>>Does anyone have any idea what could be at issue here?  Does anyone have 
>>any experience with this sort of large-ish server farm to give us any 
>>feedback on configuration settings or other tuning parameters?  Any 
>>decent tuning documents on the web that take into account this type of 
>>scenario?
>>
>>Kind regards
>>Damian Meyer
>>
>>
>>    
>>


---------------------------------------------------------------------
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] Timeouts / responsiveness issues with Apache

Posted by Matthew Shannon <ma...@paycom.net>.
What are your settings for the following;
StartServers        
MinSpareServers      
MaxSpareServers     
MaxClients         
MaxRequestsPerChild

and, when you check the memory usage of an individual instance of the
http daemon, how much memory is it using?

-m

On Thu, 2004-01-15 at 23:36, Damian Meyer wrote:
> Hi,
> 
> We have recently migrated from several individual Apache 1.3.x servers 
> running around 1000 virtual sites each to a server farm with multiple 
> servers (Apache/1.3.29) all capable of running all of the sites (about 
> 4000 in total).  The server farm is behind a load balancer running 
> ldirectord from the LVS project.
> 
> The problem we are having is that every so often one of the web servers 
> seems to go offline and either become very sluggish with responses or 
> even times-out.  If it failed totally, ldirectord would notice and map 
> it out, but it doesn't (usually).  After a few minutes of bad 
> performance, it usually comes good, but it happens frequently enough to 
> one or more of the web servers that it's causes noticeable glitches to 
> our clients.
> 
> Also, and it may or may not be related, occasionally Apache dies totally 
> (ie no live processes) and requires starting again.
> 
> Each server has 2GB of RAM.  Websites are a mix of flat HTML through to 
> complicated PHP sites using MySQL connections (we've checked the 
> database, it doesn't look like this is the problem.)
> 
> Does anyone have any idea what could be at issue here?  Does anyone have 
> any experience with this sort of large-ish server farm to give us any 
> feedback on configuration settings or other tuning parameters?  Any 
> decent tuning documents on the web that take into account this type of 
> scenario?
> 
> Kind regards
> Damian Meyer
> 
> 
> 
> ---------------------------------------------------------------------
> 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] Timeouts / responsiveness issues with Apache

Posted by Damian Meyer <ap...@damianmeyer.com>.
Hi Aaron,

Aaron W Morris wrote:

> Damian Meyer wrote:
>
>> Hi,
>>
>> We have recently migrated from several individual Apache 1.3.x 
>> servers running around 1000 virtual sites each to a server farm with 
>> multiple servers (Apache/1.3.29) all capable of running all of the 
>> sites (about 4000 in total).  The server farm is behind a load 
>> balancer running ldirectord from the LVS project.
>>
>> The problem we are having is that every so often one of the web 
>> servers seems to go offline and either become very sluggish with 
>> responses or even times-out.  If it failed totally, ldirectord would 
>> notice and map it out, but it doesn't (usually).  After a few minutes 
>> of bad performance, it usually comes good, but it happens frequently 
>> enough to one or more of the web servers that it's causes noticeable 
>> glitches to our clients.
>>
>> Also, and it may or may not be related, occasionally Apache dies 
>> totally (ie no live processes) and requires starting again.
>>
>> Each server has 2GB of RAM.  Websites are a mix of flat HTML through 
>> to complicated PHP sites using MySQL connections (we've checked the 
>> database, it doesn't look like this is the problem.)
>>
>> Does anyone have any idea what could be at issue here?  Does anyone 
>> have any experience with this sort of large-ish server farm to give 
>> us any feedback on configuration settings or other tuning 
>> parameters?  Any decent tuning documents on the web that take into 
>> account this type of scenario?
>>
>> Kind regards
>> Damian Meyer
>
>
> Since you are using PHP [with many sites], I would consider lowering 
> "MaxRequestsPerChild" so that child processes die after a reasonable 
> amount of requests. 


Currently set at 10000, will look at that.

> or
>
> I would consider trying regular restarts of apache via cron.  Since 
> you have load balanced servers, you should not be too concerned with 
> it failing to restart on one server.  I like Apache and all, but I 
> have had issues with process "build-up" on heavily used instances. 


We've actually done this as a short term workaround.  Not good with some 
scripts and their session handling though.  (No control over the quality 
of the client's scripting!)

Kind regards
Damian


---------------------------------------------------------------------
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] Timeouts / responsiveness issues with Apache

Posted by Ben Yau <by...@cardcommerce.com>.
>
> Hi Matthew,
>
> Yes, further experimentation/investigation is leading me to think the
> same things.  PHP module is big, but its also our bread and butter (and
> many of our clients).  What I need to start figuring out is why memory
> increases, or the right settings to keep that under control.
>
> Nothing in /var/log/messages of note.
>

Have you checked any of the php websites for patches ?  I haven't used PHP
much but when I worked with ColdFusion Server, we found it had quite a few
memory leaks and had to patch that up (vs the netscape server).  If you are
webhosting, could also be some bad piece of code someone wrote.  I think
there is some sort of php function you can use to test your PHP garbage
collector (leak() or something like that).  Just another avenue to test out.

Ben Yau


---------------------------------------------------------------------
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] Timeouts / responsiveness issues with Apache

Posted by Damian Meyer <ap...@damianmeyer.com>.
Hi Matthew,

Yes, further experimentation/investigation is leading me to think the 
same things.  PHP module is big, but its also our bread and butter (and 
many of our clients).  What I need to start figuring out is why memory 
increases, or the right settings to keep that under control.

Nothing in /var/log/messages of note.

Kind regards
Damian.

matt@paycom.net wrote:

>This behavior suggests a memory problem. You should never have to "cycle"
>your servers. If the memory usage climbs and climbs, your problem is
>somewhere else. Do you have too many modules loading as DSO's? Perhaps one
>of these is being used more than you anticipated. If you are running ssl,
>have you tried compiling it in statically? The PHP module is pretty hefty
>and ( in a couple of my cases at least ) caused each of the http threads
>to rise from less than a meg each to 4 megs. This quadrupled my memory
>usage and required some module rearrangement. During one of these time out
>periods, do you have system problems ( error entries in /var/log/messages
>)? Inquiring minds want to know! :)
>
>-Matthew Shannon
>
>  
>
>>Damian Meyer wrote:
>>    
>>
>>>Hi,
>>>
>>>We have recently migrated from several individual Apache 1.3.x servers
>>>running around 1000 virtual sites each to a server farm with multiple
>>>servers (Apache/1.3.29) all capable of running all of the sites (about
>>>4000 in total).  The server farm is behind a load balancer running
>>>ldirectord from the LVS project.
>>>
>>>The problem we are having is that every so often one of the web servers
>>>seems to go offline and either become very sluggish with responses or
>>>even times-out.  If it failed totally, ldirectord would notice and map
>>>it out, but it doesn't (usually).  After a few minutes of bad
>>>performance, it usually comes good, but it happens frequently enough to
>>>one or more of the web servers that it's causes noticeable glitches to
>>>our clients.
>>>
>>>Also, and it may or may not be related, occasionally Apache dies totally
>>>(ie no live processes) and requires starting again.
>>>
>>>Each server has 2GB of RAM.  Websites are a mix of flat HTML through to
>>>complicated PHP sites using MySQL connections (we've checked the
>>>database, it doesn't look like this is the problem.)
>>>
>>>Does anyone have any idea what could be at issue here?  Does anyone have
>>>any experience with this sort of large-ish server farm to give us any
>>>feedback on configuration settings or other tuning parameters?  Any
>>>decent tuning documents on the web that take into account this type of
>>>scenario?
>>>
>>>Kind regards
>>>Damian Meyer
>>>      
>>>
>>Since you are using PHP [with many sites], I would consider lowering
>>"MaxRequestsPerChild" so that child processes die after a reasonable
>>amount of requests.
>>
>>or
>>
>>I would consider trying regular restarts of apache via cron.  Since you
>>have load balanced servers, you should not be too concerned with it
>>failing to restart on one server.  I like Apache and all, but I have had
>>issues with process "build-up" on heavily used instances.
>>
>>
>>--
>>Aaron W Morris <aa...@mindspring.com> (decep)
>>
>>    
>>


---------------------------------------------------------------------
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] Timeouts / responsiveness issues with Apache

Posted by ma...@paycom.net.
This behavior suggests a memory problem. You should never have to "cycle"
your servers. If the memory usage climbs and climbs, your problem is
somewhere else. Do you have too many modules loading as DSO's? Perhaps one
of these is being used more than you anticipated. If you are running ssl,
have you tried compiling it in statically? The PHP module is pretty hefty
and ( in a couple of my cases at least ) caused each of the http threads
to rise from less than a meg each to 4 megs. This quadrupled my memory
usage and required some module rearrangement. During one of these time out
periods, do you have system problems ( error entries in /var/log/messages
)? Inquiring minds want to know! :)

-Matthew Shannon

> Damian Meyer wrote:
>> Hi,
>>
>> We have recently migrated from several individual Apache 1.3.x servers
>> running around 1000 virtual sites each to a server farm with multiple
>> servers (Apache/1.3.29) all capable of running all of the sites (about
>> 4000 in total).  The server farm is behind a load balancer running
>> ldirectord from the LVS project.
>>
>> The problem we are having is that every so often one of the web servers
>> seems to go offline and either become very sluggish with responses or
>> even times-out.  If it failed totally, ldirectord would notice and map
>> it out, but it doesn't (usually).  After a few minutes of bad
>> performance, it usually comes good, but it happens frequently enough to
>> one or more of the web servers that it's causes noticeable glitches to
>> our clients.
>>
>> Also, and it may or may not be related, occasionally Apache dies totally
>> (ie no live processes) and requires starting again.
>>
>> Each server has 2GB of RAM.  Websites are a mix of flat HTML through to
>> complicated PHP sites using MySQL connections (we've checked the
>> database, it doesn't look like this is the problem.)
>>
>> Does anyone have any idea what could be at issue here?  Does anyone have
>> any experience with this sort of large-ish server farm to give us any
>> feedback on configuration settings or other tuning parameters?  Any
>> decent tuning documents on the web that take into account this type of
>> scenario?
>>
>> Kind regards
>> Damian Meyer
>
> Since you are using PHP [with many sites], I would consider lowering
> "MaxRequestsPerChild" so that child processes die after a reasonable
> amount of requests.
>
> or
>
> I would consider trying regular restarts of apache via cron.  Since you
> have load balanced servers, you should not be too concerned with it
> failing to restart on one server.  I like Apache and all, but I have had
> issues with process "build-up" on heavily used instances.
>
>
> --
> Aaron W Morris <aa...@mindspring.com> (decep)
>
>
>
>
> ---------------------------------------------------------------------
> 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] Timeouts / responsiveness issues with Apache

Posted by Aaron W Morris <aa...@mindspring.com>.
Damian Meyer wrote:
> Hi,
> 
> We have recently migrated from several individual Apache 1.3.x servers 
> running around 1000 virtual sites each to a server farm with multiple 
> servers (Apache/1.3.29) all capable of running all of the sites (about 
> 4000 in total).  The server farm is behind a load balancer running 
> ldirectord from the LVS project.
> 
> The problem we are having is that every so often one of the web servers 
> seems to go offline and either become very sluggish with responses or 
> even times-out.  If it failed totally, ldirectord would notice and map 
> it out, but it doesn't (usually).  After a few minutes of bad 
> performance, it usually comes good, but it happens frequently enough to 
> one or more of the web servers that it's causes noticeable glitches to 
> our clients.
> 
> Also, and it may or may not be related, occasionally Apache dies totally 
> (ie no live processes) and requires starting again.
> 
> Each server has 2GB of RAM.  Websites are a mix of flat HTML through to 
> complicated PHP sites using MySQL connections (we've checked the 
> database, it doesn't look like this is the problem.)
> 
> Does anyone have any idea what could be at issue here?  Does anyone have 
> any experience with this sort of large-ish server farm to give us any 
> feedback on configuration settings or other tuning parameters?  Any 
> decent tuning documents on the web that take into account this type of 
> scenario?
> 
> Kind regards
> Damian Meyer

Since you are using PHP [with many sites], I would consider lowering 
"MaxRequestsPerChild" so that child processes die after a reasonable 
amount of requests.

or

I would consider trying regular restarts of apache via cron.  Since you 
have load balanced servers, you should not be too concerned with it 
failing to restart on one server.  I like Apache and all, but I have had 
issues with process "build-up" on heavily used instances.


-- 
Aaron W Morris <aa...@mindspring.com> (decep)




---------------------------------------------------------------------
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] Timeouts / responsiveness issues with Apache

Posted by Damian Meyer <ap...@damianmeyer.com>.
Hi Ben,


Ben Yau wrote:

>>Does anyone have any idea what could be at issue here?  Does anyone have
>>any experience with this sort of large-ish server farm to give us any
>>feedback on configuration settings or other tuning parameters?  Any
>>decent tuning documents on the web that take into account this type of
>>scenario?
>>
>>    
>>
>
>What OS are you running?  I'm guessing Linux (Redhat?) since that is common
>with PHP/MySQL web host implementations.
>

Redhat Linux (7.3 if that makes a difference)
Kernel  2.4.20-28.7smp

Apache/1.3.29 compiled from source
Server version: Apache/1.3.29 (Unix)
Server built:   Jan 14 2004 15:33:12
Server's Module Magic Number: 19990320:15
Server compiled with....
 -D HAVE_MMAP
 -D HAVE_SHMGET
 -D USE_SHMGET_SCOREBOARD
 -D USE_MMAP_FILES
 -D HAVE_FCNTL_SERIALIZED_ACCEPT
 -D HAVE_SYSVSEM_SERIALIZED_ACCEPT
 -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
 -D DYNAMIC_MODULE_LIMIT=64
 -D HARD_SERVER_LIMIT=2048
 -D HTTPD_ROOT="/usr/local/apache"
 -D SUEXEC_BIN="/usr/local/apache/bin/suexec"
 -D DEFAULT_PIDLOG="logs/httpd.pid"
 -D DEFAULT_SCOREBOARD="logs/httpd.scoreboard"
 -D DEFAULT_LOCKFILE="logs/httpd.lock"
 -D DEFAULT_ERRORLOG="logs/error_log"
 -D TYPES_CONFIG_FILE="conf/mime.types"
 -D SERVER_CONFIG_FILE="conf/httpd.conf"
 -D ACCESS_CONFIG_FILE="conf/access.conf"
 -D RESOURCE_CONFIG_FILE="conf/srm.conf"

Compiled-in modules:
  http_core.c
  mod_env.c
  mod_log_config.c
  mod_mime.c
  mod_negotiation.c
  mod_status.c
  mod_include.c
  mod_autoindex.c
  mod_dir.c
  mod_cgi.c
  mod_asis.c
  mod_imap.c
  mod_actions.c
  mod_userdir.c
  mod_alias.c
  mod_access.c
  mod_auth.c
  mod_so.c
  mod_setenvif.c
suexec: enabled; valid wrapper /usr/local/apache/bin/suexec


>For large servers like these, I'd spend an equal amount of time system
>tuning as I would apache tuning.
>
>System wise:
>
>What does running "top" on the machine tell you as you see these symptoms?
>  
>

More investigation has led us to think it may related to memory usage, 
which seems to gradually increase until the machine is forced to swap, 
but what is leaking I don't know.

>Whether a large or small server farm, RAM is where I check first.  2GB is a
>lot, but it's always good to check.  How's the swapping (or lack of
>hopefully) looking on your servers?  That could explain how it slowly dies.
>That eventually your resources just get used up and your OS starts acting
>strange.  How is the CPU usage when the server starts to die?
>

CPU usage is minimal.  Memory (and eventual swapping) is looking like a 
likely culprit.

>Have you already monitored your sys resources as it starts to slow down and
>crash (using top, vmstat, iostat, etc.).   Do the network connections
>increase?  Does the disk reading/writing increase (like someone putting up a
>large file for download)?
>

We've been doing that, starting to build a picture.  Still not sure what 
to do about it though.

>What you'd really want to do is tweak your kernel also.  I don't know the
>variables for Linux kernels, but look at anything with "max" in it.  I'm
>guessing there is something like  maxusers (which I htink in turn defines
>maxfiles and a lot of other variables).  I'm thinking large web hosting
>sites may run into problems with opening a large number of files all at one
>time.  And websites particularly contain a lot of little files like those
>whitepixel.gif or blackpixel.gif and other small files.
>
>Apache has some performance tuning notes for various OS here:
>http://httpd.apache.org/docs/misc/
>
>
>Apache-wise, since you're running such a large site, every little minor
>thing will help.  There is a list of some things to check in the apache
>docs:
>http://httpd.apache.org/docs-2.0/misc/perf-tuning.html
>
>That is a great resource.
>
>What are your "min" and "max" settings in httpd.conf?
>
>Specifically, I would also think about increasing MaxClients to just about
>the limit if your memory is substantial enough.  And also decrease
>KeepAliveTimeout (if you want to turn it off altogether, that's another
>option.  I'd rather decrease the Timeout first before turning it off)
>  
>

The keepalive is HTTP/1.1 persistent connections, right?  Does anyone 
have real world data on how turning this off affects the client's 
browsing experience on a busy webserver?

Many thanks for all your pointers. 

Kind regards
Damian.



---------------------------------------------------------------------
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] Timeouts / responsiveness issues with Apache

Posted by Ben Yau <by...@cardcommerce.com>.
>
> Does anyone have any idea what could be at issue here?  Does anyone have
> any experience with this sort of large-ish server farm to give us any
> feedback on configuration settings or other tuning parameters?  Any
> decent tuning documents on the web that take into account this type of
> scenario?
>

What OS are you running?  I'm guessing Linux (Redhat?) since that is common
with PHP/MySQL web host implementations.


For large servers like these, I'd spend an equal amount of time system
tuning as I would apache tuning.

System wise:

What does running "top" on the machine tell you as you see these symptoms?

Whether a large or small server farm, RAM is where I check first.  2GB is a
lot, but it's always good to check.  How's the swapping (or lack of
hopefully) looking on your servers?  That could explain how it slowly dies.
That eventually your resources just get used up and your OS starts acting
strange.  How is the CPU usage when the server starts to die?

Have you already monitored your sys resources as it starts to slow down and
crash (using top, vmstat, iostat, etc.).   Do the network connections
increase?  Does the disk reading/writing increase (like someone putting up a
large file for download)?

What you'd really want to do is tweak your kernel also.  I don't know the
variables for Linux kernels, but look at anything with "max" in it.  I'm
guessing there is something like  maxusers (which I htink in turn defines
maxfiles and a lot of other variables).  I'm thinking large web hosting
sites may run into problems with opening a large number of files all at one
time.  And websites particularly contain a lot of little files like those
whitepixel.gif or blackpixel.gif and other small files.

Apache has some performance tuning notes for various OS here:
http://httpd.apache.org/docs/misc/


Apache-wise, since you're running such a large site, every little minor
thing will help.  There is a list of some things to check in the apache
docs:
http://httpd.apache.org/docs-2.0/misc/perf-tuning.html

That is a great resource.

What are your "min" and "max" settings in httpd.conf?

Specifically, I would also think about increasing MaxClients to just about
the limit if your memory is substantial enough.  And also decrease
KeepAliveTimeout (if you want to turn it off altogether, that's another
option.  I'd rather decrease the Timeout first before turning it off)

Ben Yau



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