I've got a website (Wordpress based) that became unresponsive. I SSH'd into the server and saw that we were out of memory. Errors in my apache log files indicated the same... things failing to be allocated due to lack of memory). Restarting the server fixes it.

So I look in access.log and error.log around the time of the incident but I see nothing strange. No extra traffic, no unusual requests. In fact the only request around the time of the problem was one from Googlebot for an rss feed... at that point I start to see 500 response codes in the logs until the machine was rebooted. I look in message.log hoping to see something but there is nothing at all for that entire day (which is odd as there are entries for every other day).

The site has a large amount of memory allocated to it and normally runs using about 30% of what is available. My question... how would you go about trying to track this down at this point? What are some other log files I could check or strategies I could take?

link|improve this question
Use munin to record changes in memory in graph form.. it won't tell you what's causing the issue but it can help pinpoint the timing of trends and spikes. – joshuahedlund May 18 at 19:32
feedback

migrated from superuser.com Jan 19 at 5:12

This question came from our site for computer enthusiasts and power users.

3 Answers

Top and PS are very good tools. I would also look into /proc/meminfo. You can start Valgrind together with Apache to check for memory leaks. But I wouldn't recommend Apache anyway.

link|improve this answer
What would you suggest instead of Apache then? – Lèse majesté Feb 18 at 13:21
Well, if Apache is what is giving you problems, nginx (pronounced "engine-x") is a good alternative. – Matt Feb 18 at 17:09
feedback

Check for the wa line in top it will show if you have io wait

If so, check your MySQL error log and try to analyse / repair your tables.

This can be a network or storage problem. The wait average will tell you that .

Hope this helps

link|improve this answer
feedback

You should first disable all your plugins, then restart your apache server. Run top or mtop in terminal and determine if memory leaks have been fixed. If so begin activating plugins and waiting 10-15 minutes and checking your memory usage on the server to try and determine if it is a plugin.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown