News for hackers. Stuff that matters.
Re:Hire HN: Apache is crashing every hour. Seeking Drupal/Ng... by lazyant on Wednesday September 01, 2010 @11:56AM (#1653110)
(raises hand) my turn! (I fix these problems and other stuff for a living).

There are short answers and long answers to this problem.

The short answers try to fix quickly what the most likely cause of the problem is. If a server is being unresponsive this is most likely because the server runs out of memory or incurs in heavy disk I/O. For the memory problem find what are the processes eating up the memory. For apache lowering the MaxClients/MaxServers/KeepAlive helps. For I/O you'll have to look at the database (see error log, log long queries etc).

But that's speculation.

The proper way to fix the issue is to understand what's really causing it. A way to start is getting meaningful server utilization data and reviewing logs.

Spend a few minutes installing a graphical monitoring tool like munin or google's quicklook (I like these because they are lightweight, there's a ton of them like cacti etc). In a couple of hours you'll get a better picture of what's going on.

Review the logs, specially error logs.

I use a little script that runs every 15 mins and logs the most important stuff that is going on in the server, you can run something similar every 5 mins or whatever to find what's really going on: http://pastebin.com/Qv0J3WHY

Another tip is to set up a mirror test/stage server and benchmark the heck out of it; you don't want to make a lot of changes live in a production server.

I guess you can also ask the support people at Slicehost.

I'll gladly take a look at your server for up to 30 mins at no cost.

Re:Hire HN: Apache is crashing every hour. Seeking Drupal/Ng... by nl on Wednesday September 01, 2010 @07:16PM (#1654659)
Good advice, but one small nitpick: Quicklook isn't Google's - it's just hosted at code.google.com.