We installed Moodle in a shared hosting account and it has been humming along nicely until recently. I think the hosting co. has reduced the resource limits for shared hosting because now we get errors when accessing just the main moodle page. Now we're getting errors when pages try to load their resources (.js, etc) The errors are from suphp:
Cannot allocate memory: couldn't create child process: /opt/suphp/sbin/suphp
because we are probably hitting a cap on RAM or the number of concurrent processes.
The ISP is telling us that we need a VPS or dedicated server which is way too expensive and is overkill for website that gets little use. As far as I know, this moodle installation is only used when my friend does a freelance training class, which is 2-3 times per year with less than 20 students. At the moment there are no students accessing the site and only one or two of us accessing the site for course maintenance. I'm sure a shared hosting account must be able to handle the load.
Is ther any way to limit the number of requests that moodle will process at one time? I guess I should set the MaxClients setting in apache.conf but I don't have access to that file its not a setting that can be put in a .htaccess file.
Moodle is a big web application and just doesn't run very well on very cheap hosting.
Small advertising opportunity - have you tried a Moodle Partner? Some (e.g. us) do some basic packages for people in your sort of position. The difference being that they work
Did you ever have any luck with this, or did you give up and go with a different host? I'm running into the same problem, getting hundreds of errors like this:
[ 11:04:09 2012] [error] [client 22.214.171.124] (12)Cannot allocate memory: couldn't create child process: /opt/suphp/sbin/suphp for /theme/image.php, referer: /enrol/instances.php?id=2
I am the only one using Moodle at the moment; I'm running Moodle 2.0.3 on a shared machine. I'm allowed 768mb RAM, have read and implemented all the suggestions on the Performance page (at least all the ones my hosts will give me access to), yet still Moodle overloads memory practically every time I load a page. I am amazed that it could be this resource intensive.
User Mike Thon has left this forum. Here's my two cents on this issue:
Frankly, your Moodle doesn't have much of a chance with this particular hosting. Moodle is not something for cheap shared hosting.
Still, you can try few things, but the problem is likely to reappear.
- Try working as a normal user, giving him "Teacher" privileges to the course.
- Install a PHP accelerator.
- If at all possible Go back to Moodle 1.9.latest. Otherwise update Moodle to 2.0.latest.
I wonder whether moving up to 2.2 is a good idea. In the past there were stretches like 1.7 -> 1.8 -> 1.9 where the efficiency _improved_. The step to 2.0 went backwards efficiencywise. I don't know how it developed along 2.1 -> 2.2, soon 2.3.
Thanks very much for the reply and the advice! I'll try this.