title: MySQL/PHP consumes all memory
body: <p>I have problem with MySQL usage a lot of memory.</p>
  
  <p>Added this in SSH to view the memory consumption.</p>
  
  <pre><code>ps --no-headers -Leo pmem,pcpu,command|awk 'BEGIN { print "CPU\t\ttMEM\t\tPROCNAME \n" } {{array[$3]+=$2};{array2[$3]+=$1}} END { for ( item in array) print array[item] " %" "\t" ,array2[item] " %" "\t\t", item }' |awk 'NR==1;NR &gt; 1 {print $0 | "sort -rn -k 1,1"}'
  </code></pre>
  
  <p>This image of memory consumption: <a href="http://i.stack.imgur.com/Dcdfq.png" rel="nofollow">http://i.stack.imgur.com/Dcdfq.png</a></p>
  
  <ul>
  <li>Previous image shows a high consumption of MySQL/PHP</li>
  </ul>
  
  <p>VPS server specifications:</p>
  
  <p>Burst Memory: 2048 MB</p>
  
  <p>Guaranteed Memory: 1024 MB</p>
  
  <p>RAID10 Storage: 60 GB</p>
  
  <p>Monthly Traffic: 2000 GB</p>
  
  <p>OS: Centos 6 32-bit</p>
  
  <p>cPanel&amp;WHM</p>
  
  <p>How can resolve it?</p>