Linux – How to diagnose a web server memory spike

centoslinuxmemory usageweb-server

My web server gets inexplicable memory spikes every once in a while (before eventually crashing) and I can't figure out what is causing it or how to solve it. I've spent the whole morning looking at error and access logs and I can't find anything unusual.

I have 3 images:

  1. server status graph:
    http://i.stack.imgur.com/6QnsQ.png

  2. top:
    http://i.stack.imgur.com/ZYY1P.png

  3. ps aux: (edit – site won't let me post the 3rd because I'm too new)

Any help in solving this mystery would be greatly appreciated.

Best Answer

Can you please pastebin the /proc/meminfo output.

Also, I don't know when you took the snapshot of top but I see that you are not using any cached memory. You have any knowledge why so or did you notice this before?

Along with that, can you provide the relevant bits and pieces of the /var/log/messages before the crash.

BTW, one httpd process is in Z state but that won't cause the problem.

Also, look at the sar logs to see if you can identify any memory usage pattern.

Related Topic