Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

Your Answer


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.