Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I am having some issues on a server where multiple Apache processes are being spawned and eating up the physical memory and swap.

Each httpd process consumes around 130MB of RES. However, PHP's memory_limit is set at 32MB.

The initial thinking is that there is a memory leak in PHP code - however, I don't see any particular code that could be causing this... granted the codebase is not necessarily efficient, however, what other explanations are there for such large memory consumption by Apache given memory_limit is set quite low?

share|improve this question
    
Because apache does other things then just running php? What other modules do you have running? –  Zoredache Dec 2 '11 at 17:51
add comment

1 Answer 1

up vote 3 down vote accepted

memory_limit is the maximum memory that apache is allowed to allocate per script. If you have multiple scripts running, on the same instance, it's normal that httpd uses more than 32MB.

share|improve this answer
    
+1 you need to tune Apache's settings: MaxClients, KeepAlive, etc. Search the web for "Apache performance tuning". –  xofer Dec 2 '11 at 18:34
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.