Re: Memory Question
[prev]
[thread]
[next]
[Date index for 2005/02/02]
shawn wrote:
> Hi, I am sure this is a simple question but I just can’t seem to find
> any documentation that can tell me exactly what is wrong. The current
> box I am running my apache 1.3.28 / Mod_perl server is a quad zeon 500
> with 3GB of Ram,
wow! I won't mind having one of those warming my room on the cold nights :)
> the server in general doesn’t get all that many hits,
> around 300,000 a day. Lately I have been seeing “server reached
> MaxClients setting, consider raising the MaxClients setting” about 6
> seconds after I start up apache. Then I added
[....]
> and found the average site to be 37MB so I added
>
> PerlFixupHandler Apache::SizeLimit
>
> $Apache::SizeLimit::MAX_UNSHARED_SIZE = 50000;
>
> $Apache::SizeLimit::CHECK_EVERY_N_REQUESTS = 10;
but it gets checked every 10 requests per process! So if you have 60
processes. that means only on the 600th request it'll get checked. At
least while debugging I'd check every request. But see below.
> Which I thought should cap it at 50MB so 3000 / 50 = 60 so I set
What this has to do with the memory limit? You hit the maxclients because
Apache has spawned 60 clients, not because you run out of memory. That
normally means that you either have 60 concurrent requests or you have
some sort of run-away processes, which don't return to the pool of free
servers.
I suggest that you install Apache::VMonitor and observe what exactly
happens to your servers. Hint: it'll also show you the real memory usage,
which you may have calculated incorrectly with other tools.
And you may want to review those chapters/sections:
http://modperlbook.org/html/ch10_01.html
http://modperlbook.org/html/ch11_01.html#pmodperl-CHP-11-SECT-1
--
__________________________________________________________________
Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:stas@xxxxxx.xxx http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org http://ticketmaster.com
 |
 |
Re: Memory Question
Stas Bekman 04:03 on 02 Feb 2005
|