plainblack.com
Username Password
search
Bookmark and Share

    

Apache / too much memory

User martien
Date 9/6/2010 12:57 pm
Views 546
Rating -1    Rate [
|
]
Previous · Next
User Message
martien

 

"Killed XX Apache/mod_perl processes that were using too much memory."

I tried a lot to reduce this kind of error.

What may be the consequences of this error?
Can this work out on sending out or getting emails?



Back to Top
Rate [
|
]
 
 
preaction

If you are getting this error it means either Apache is running away during a single request (unlikely unless you have custom code) or your wre.conf has "maxMemory" set too low. 

maxMemory should be set to at least twice the size of the Apache2::SizeLimit settings in wre/etc/modperl.pl



Back to Top
Rate [
|
]
 
 
martien

 

maxMemory should be set to at least twice the size of the Apache2::SizeLimit settings in wre/etc/modperl.pl

That was it.
Wre.conf and modperl.pl both had 100kB

Then  I read http://perl.apache.org/docs/2.0/api/Apache2/SizeLimit.html
where it a.o. says:

"For linux we read the process size out of /proc/self/statm. This seems to be fast enough on modern systems. If you are worried about performance, try setting the CHECK_EVERY_N_REQUESTS option."

and

"Since linux 2.6 /proc/self/statm does not report the amount of memory shared by the copy-on-write mechanism as shared memory. Hence decisions made on the basis of MAX_UNSHARED_SIZE or MIN_SHARE_SIZE are inherently wrong."

According to that, the minimum modperl.pl would be:

use Apache2::SizeLimit;
$Apache2::SizeLimit::MAX_PROCESS_SIZE = 100000;

Right?

 



Back to Top
Rate [
|
]
 
 
preaction

Is that how much you want your processes to grow to? How much free memory do you have when modperl isn't running and everything else is? How many processes is modperl allowed to spawn? Those determine how much memory each process should be allowed to consume.



Back to Top
Rate [
|
]
 
 
    



© 2012 Plain Black Corporation | All Rights Reserved