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?

  • Because apache does other things then just running php? What other modules do you have running? – Zoredache Dec 2 '11 at 17:51

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.

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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