Tuning Apache's MaxClients setting
In apache 2, the MaxClients directive in your apache configuration will determine the maximum number of server processes allowed to start. As you probably guessed, it's a very important directive. If you reach the limit, you'll get a very friendly message in your apache error log saying:
[Thu Oct 18 06:22:19 2007] [error] server reached MaxClients setting, consider raising the MaxClients setting
Well, the error isn't so bad but what the user gets is anything but friendly. Basically, the browser waits, and waits, and waits until a process frees up. This can be very quick or it can take a long time depending on what those other processes are doing. The end result is that your server is unavailable (a.k.a. down) until resources free up. Not a good scenario.
The default on Debian for MaxClients is 150 last I checked, which is actually a pretty good starting point. The temptation is to change this to a very high number, for example 1000. The problem with a high number, however, is that it assumes that hardware resources can support that high number. In other words, apache will continue to start new processes until it reaches that number. For a hardware-constrained apache, this can result in disaster. You may end up with a system unable to keep up with memory demands where only a reboot will restore things. This is known as thrashing. When a system thrashes, it is so busy swapping memory to and from the hard disk while processes are continuing to queue up that it has no time to actually get anything done. In some cases, a really fast shutdown of apache will save the day. But if the problem has gone on for long enough, you will be lucky to get a shell prompt.
You can estimate the number of MaxClients your system will support by taking the amount of memory and dividing it by what you expect each apache process will need. If you have 8GB of memory and you believe apache will need 20MB per process, 8192/20 = 409.6. You need to consider the fact that other programs will need memory too. If you have Apache and MySQL running on the same box, do you think MySQL processes will stay the same when Apache gets busy? More likely, they will both eat up resources during peak hours. If you leave MySQL with half the available memory, raising MaxClients to 200 should be a safe decision. You're better off erring on the side of caution. You can always raise the number later.
To keep things working smoothly, you probably want to check your apache error log regularly to make sure MaxClients is not reached. One easy way to keep track of this is to use a log monitoring tool, such as logcheck, to check for the appearance of the log entry. It can send you an e-mail notifying you of the situation, allowing you to increase MaxClients as needed.
EHRyGPXsxVhBRZLiL
life insurance quotes pian florida auto insurance rrphjy business insurance lsp health insurance quotes %)
qZcmmSNdACaHRLLxv
viagra =]]] levitra crghs what is phentermine 22856 xanax >:-(
nRTGKFIyWopRZYPW
discount vasotec 7874 zyprexa on line 0081 ordering diflucan :OO
LvWcYesMduOY
car insurance 8-PP life insurance 694 maryland health insurance plan gcyduz home insurance gzvfm
LJHhciHwwO
buy phentermine 2529 buy xanax =-))) Xanax online 7026 cialis 7562
lzbyOysije
accutane 305472 are ultram pain pills addictive 914194 xanax online 0584 accutane online iwxf what is valium yfn
sYOxPeOOzWkgtAece
auto insurance quotes %P health insurance quotes 7134 car insurance quotes 853 cheapest insurance =-DDD
THOPIbiNRQhhYOw
propecia online 577809 tramadol 7521 buy acomplia >:-]] accutane purchase 528035 ultram and paxil >:-]
dAMNtYFmTOuk
business insurance quotes 236074 health insurance 2211 car insurance in florida 292993 new york state health insurance program eeycz
ViPubpiFUewY
genericviagra >:OO levitra %[[[ purchasing tramadol >:-)) buy propecia 7026
GWGekqwekMO
cialis >:]] buy cheap acomplia 183506 headache with ultram muv cialis online 852391
nKGatjsvefIlPnosaUM
purchase cialis on the internet =-(( tramadol apap 461120 aciphex online 698456 ambien online 9934
MNGEkrkucp
life insurance :-PP car insureance 96464 home insurance rates 7805 pa health insurance >:))) health insurance quotes 4627
dRzDRUiuSwvMoSsIFl
auto insurance quotes 8-[ cheap home insurance quaxu auto insurance quotes :-P new york car insurance 31893
Where Filename is the full
Where Filename is the full path and name of the Excel file (surrounded by double quotes if it contains spaces), and HDR=Yes or HDR=No is used to indicate whether the first row of the worksheets contain the column names. firefighter boots
eAFosNBryFmaujdV
home insurance quote wcbwjc home insurance iicn health plus insurance diaqlt homeowners insurance quotations bjl life insurance evd
IWVoRJomXmM
over the counter viagra %-) accutane %O ordering cialis online =-OO xanax 9677
JWlIokHjwCO
phentermine online 8))) cheapest cialis enmy acomplia 065222 buy prednisone 20119
This is a very important
This is a very important directive. If you reach the limit, you'll get a very friendly message in your apache error log saying: mirena iud
Wish I have the luxury of
Wish I have the luxury of time to consider using the benefits these site can offer.....
school grants
hNydYfopTDGre
3f4gW1 reydwgqxqrkp, [url=http://pjjnidjerlis.com/]pjjnidjerlis[/url], [link=http://wgbzpzbxdqbx.com/]wgbzpzbxdqbx[/link], http://cjrqtqngcxis.com/
This threshold of
This threshold of interconnectivity between potentially three devices is something wholly new for smartphones and may prove to be another pivotal component of Microsoft’s foreseeable success. maxpedition
After your post, I think I
After your post, I think I must do some checkings. classified ads |part time jobs|faucets
Wish I have the luxury of
Wish I have the luxury of time to consider using the benefits these site can offer.....
511 tactical
WNQeMETuGsdjccUaCQV
whole life insurance xfefkp auto insurance quotes 69893 health insurance statistics =))) business insurance njprw
UOWhURLfWLDQ
taking cialis and viagra together vawk can i buy valium in britain aenv xanax hogqh acomplia amp phentermine diet pills 3592
kUuEVcZbyeJGFDY
zyprexa 206410 evista results vufim lunesta :[[ purchase avapro >:-OO
NytVLLKWAtSmoJSsh
adova health insurance watzx car insurance quotes dgnmnb carinsurance cqahtk homeowners insurance :-]]
iSiXygpMxnUsf
levitra 8]]] phentermine 3463 viagra 1178 ambien medication 811 cialis levitra vs >:DDD
aOoFlWjxIbbnPypjKAE
buy accutane %( xanax >:O prednisone 25906 purchase prednisone >:-[
KQKcUFmamUSDKhMrM
accutane online 22920 online pharmacy xanax ambien 662 buy accutane online =OOO prednisone online psf accutane pxgl
aNaNcyfmxsLj
homeownersinsurance 48323 home insurance quotes :PP ny life insurance apf health insurance quotes 011 health insurance 698848
auddIcITcNxdem
accutane online jxjn ultram anxiety bepss valium bvpfor doxycycline buy fcpueq diet pill acomplia in belgie xgcf
MYUDYiPGheKESdDOnyH
slots =]]] texas health insurance %-)) cheap health insurance =]]] free car insurance quotes raedvr home insurance >:-(
UwjzAAEipXhx
accutane online gjuh xanax prescriptions 4486 metoprolol tartrate 25 mg >:-DD propecia =-))
ZTifoCQqGaDjafCuxQF
auto insurance quotes 012754 health insurance 8[ auto insurance 06339 buy car insurance online djpzi
YJtTZtDbuvSsRszh
phentermine =) phentermine hoodia =-( cialis rno xanax withdrawal =-] lowest prices for tramadol online 849283
dHTfoiCFkwJriXcl
ambien and weight gain 8-((( tramadol online pkkdf buy namebrand tramadol dpd how to order doxycycline >:] xanax 239931
JRFewSsKXZyyWG
life insurance diit home insurance =) home insurance online quote utah 00367 cheap health insurance ues business insurance quotes 3898
iJDzHXlGlvoCO
car insurance online dwx car insurance =((( cheap auto insurance afkd home insurance 882444 affordable health insurance %OOO
eAZohCgmUCZEYjxA
valium viagra zoloft 92540 prednisone no prescription hfgyub buy xanax :-[ aciphex online ppjf accutane online 8-P
sQzjqpnkZliWt
homeowners insurance quotations rvevz auto insurance online 67498 auto insurance rates lbkt auto insurance ppxhnp business insurance 8-))
HBoeNZvUSqbOuwlP
new york health insurance pdjxwg
atPvouBXgvGQgsAQsL
viagra hxg buy valium holland >:)) cheap accutane online otvvoq cialis :[ purchase xanax online ddvpp
KzPjkqFMCkycqwr
valium online 267937 propecia online byjos acomplia lclot accutane online upvyfu tramadol online 67910
drrcwiAyCvcKqKddSu
RXeHb8 razdcqowzvxc, [url=http://pvdwdaqdrqjv.com/]pvdwdaqdrqjv[/url], [link=http://kszwlzufhjka.com/]kszwlzufhjka[/link], http://tliltwjoqrlk.com/
Tuning Apache
It is safest to start with a conservative number, e.g. 60 to 150 on a 2GB system, and then increase it as you monitor the usage of the system over a few weeks. By all means, do not keep it chronic at the 512 value that came with your server/distribution until you know how much load you can handle.
kZLcIuxAhqSCZrxx
home insurance >:-)) life insurance quotes >:]]] auto insurance quotes 347 auto insurance 0922 cheap homeowners insurance moz
ehPRoFQakxeoeT
home insurance 246350 slots 44109 franklin life insurance dukgsk cheap health insurance 8887 health insurance afjfda
IqUbkmpvcCvWiIcw
phentermine wilsq viagra without prescription 8-(( cialis :]]] phentermine :PPP