title: Apache httpd using all memory till server down
body: <p>I have a server Intel(R) Xeon(R) CPU X3440 with 8GB RAM.<br>
  From what I see that the Apache using all the RAM and make the server unresponsive.<br></p>
  
  <p>Here is my Apache Configuration:</p>
  
  <pre><code>&lt;IfModule prefork.c&gt;
  StartServers       8
  MinSpareServers    5
  MaxSpareServers   20
  ServerLimit      1000
  MaxClients       1000
  MaxRequestsPerChild  4000
  &lt;/IfModule&gt;
  </code></pre>
  
  <p>And this is my free -m:</p>
  
  <pre><code>         total       used       free     shared    buffers     cached
  Mem:      7859       7725        134          0        189       1566
  -/+ buffers/cache:   5969       1889
  Swap:     4095         61       4034
  </code></pre>
  
  <p>And this is my TOP :</p>
  
  <pre><code>top - 10:19:57 up 23 min,  1 user,  load average: 8.08, 6.50, 3.90
  Tasks: 1124 total,   1 running, 1123 sleeping,   0 stopped,   0 zombie
  Cpu(s):  9.8%us,  3.2%sy,  0.1%ni, 60.0%id, 26.2%wa,  0.0%hi,  0.6%si,  0.0%st
  Mem:   8048096k total,  7924168k used,   123928k free,   207920k buffers
  Swap:  4194300k total,    79820k used,  4114480k free,  1460356k cached
  
  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
  1921 mysql     20   0 1653m  39m 3428 S 62.7  0.5   6:26.24 mysqld
  7944 apache    20   0  399m  29m 4236 S  6.6  0.4   0:10.13 httpd
  3201 apache    20   0  382m  11m 3880 S  2.3  0.1   0:00.50 httpd
  8030 apache    20   0  382m  10m 3872 S  2.0  0.1   0:00.39 httpd
  2837 apache    20   0  384m  13m 3916 S  1.3  0.2   0:00.37 httpd
  3160 apache    20   0  383m  11m 3908 S  1.3  0.2   0:00.55 httpd
  10555 apache    20   0  382m  11m 3884 S  1.3  0.1   0:00.48 httpd
  13626 apache    20   0  381m  10m 3828 S  1.3  0.1   0:00.05 httpd
  13668 apache    20   0  382m  11m 3760 S  1.3  0.1   0:00.16 httpd
  14284 apache    20   0  381m  10m 3712 S  1.3  0.1   0:00.06 httpd
  2848 apache    20   0  382m  11m 3876 S  1.0  0.2   0:00.49 httpd
  5254 apache    20   0  382m  11m 3852 S  1.0  0.1   0:00.25 httpd
  6085 apache    20   0  382m  10m 3768 S  1.0  0.1   0:00.26 httpd
  6257 apache    20   0  382m  11m 3876 S  1.0  0.1   0:00.50 httpd
  8067 apache    20   0  380m 9.8m 3732 S  1.0  0.1   0:00.18 httpd
  14314 apache    20   0  382m  10m 3768 S  1.0  0.1   0:00.09 httpd
  14328 apache    20   0  380m 9288 3800 S  1.0  0.1   0:00.16 httpd
  </code></pre>
  
  <p>So what is the recommends to solve this problem?</p>