I'm getting the following error in cPanel's error log:
Quote:
|
[Wed Oct 24 07:59:10 2007] [error] [client 66.249.72.162] (12)Cannot allocate memory: couldn't create child process: /opt/suphp/sbin/suphp for /home//public_html/index.php
|
It's been happening every day for the last few days at about the same time, and the site goes down for a while before recovering. It has also happened twice in the afternoon over the past several days. My client is going nuts because they thought moving to a VPS would solve all our problems.
Yesterday, after talking to tech support, I made the following changes to php.ini:
Code:
memory_limit = 256M
max_execution_time = 300
That doubled the memory and the execution time, but this morning, as you can see by the date in the error above, I got the same error.
Unfortunately, I haven't found a way to reproduce the error myself.
I spoke to Hostican again today, and on their advice I restarted Apache just now. The person I spoke to suggested that I consider reverting to an earlier version of PHP (I have 5.2.4) and/or setting up a cron job to restart Apache each morning. He also suggested I post here.
I did a WhoIs on the IP for the error above and it was Google. Kind of interesting, maybe if Google is crawling the site every morning at the same time that would explain the timing, anyway. I don't know if Google has been the culprit each time, though.
Does anyone have any ideas how I can troubleshoot this further or steps I can take to prevent it from happening? Should I go with an earlier version of PHP? Set up a cron job to restart Apache?
I usually try one thing at a time to try to identify what works, so the order to try things in is another question, and since I restarted Apache today, maybe I should give it a day to see if it happens tomorrow?