Sunday, May 3, 2015

wordpress - Apache process seems to die every hour

Background: I have a very old site running on a very old VPS, a very old Apache and a very old PHP that I can't upgrade because it's a very old CentOS machine. It's an up-to-date WordPress site that serves about 100 pages/minute in a suExec setup. Yes, 100/minute.



Today a site went down for about 15 minutes, starting at 7:01 pm. The first relevant message in the error log file is this:





[Fri Aug 01 19:01:41 2014] [error] [client: a.b.c.d] Premature end of script headers: index.php, referer: ...




There are about two or three hundred more error messages in the log file, ending at 7:02. Google Analytics tells me that the site kept responding to 1 or 2 requests/minute. At 7:15, it started responding normally again, without any intervention from me. The error log file has the normal Apache notices about starting up, like this:




Fri Aug 01 19:16:17 2014] [notice] suEXEC mechanism enabled (wrapper: /usr/local/apache/bin/suexec)




I'm at a loss as to what's causing this. Could it be the server or Apache or PHP running out of memory? Running top gives this for memory, so it seems like it should be something else:




Mem:   1048576k total,   472756k used,   575820k free,        0k buffers
Swap: 0k total, 0k used, 0k free, 0k cached


We need to get through the next two weeks, at which point we will be migrating to a new host. We're ditching the VPS at that point, but we need to squeeze as much reliability out of the old crap as we can until then.

No comments:

Post a Comment

linux - How to SSH to ec2 instance in VPC private subnet via NAT server

I have created a VPC in aws with a public subnet and a private subnet. The private subnet does not have direct access to external network. S...