View Full Version : Out of memory

11-10-2010, 09:21 PM
Any one got any ideas on what I can for this type of error?

Fatal error: Out of memory (allocated 18087936) (tried to allocate 77824 bytes) in /home/smcort1/public_html/cursos/mod/glossary/filter.php on line 142

I have upped PHP's memory_limit to 512 then I made it unlimited (-1) to just check, no go.

I also added this to my.cnf file and restarted mysql to test that, no go:


Any more ideas and what it could be?

I have a centos system with 512, we are only using 225 though of the alloted memory. Would I really need to upgrade to 1GB?

This moodle system was working 100% for 2 weeks, it just started this on Sat.

Plus there is another Moodle installed on the same server but a different install with no problems.

Any ideas what else I could check, I am at my wits end here.

11-10-2010, 09:27 PM
Have you checked that a certain script/function isn't going into an eternal loop or suchlike? That will consume all available memory fast. :D Iffily coded stuff which is looping and not freeing memory can also do it. If you can instigate the error by doing a certain action, check the code/function/class responsible.

11-10-2010, 09:37 PM
Well I originally thought maybe, but two problems. Tell me if I am right in my two problems with this being it or if not, if not I will check once again.

I originally thought so, but it's not always on the same file or the same line. Some times I get the error for

Fatal error: Out of memory (allocated 17825792) (tried to allocate 311296 bytes) in /home/smcort1/public_html/cursos/mod/forum/lib.php on line 649

Which is a different file, then sometimes on another page I get this:

Fatal error: Out of memory (allocated 18087936) (tried to allocate 4864 bytes) in /home/smcort1/public_html/cursos/mod/hotpot/lib.php on line 2401

They are all different functions and different files completely.

Plus as I said, it hasn't done this for two weeks since we installed on the new server. Now, we haven't changed anything at all, and now it's doing it.

So that's why I ruled that out, plus it was working on the old server just fine.

11-10-2010, 10:23 PM
HTTPD server possibly? What general config differences are there now, (if any), compared to what you had.

11-12-2010, 12:03 AM
Aha that is what it is, thank you. It was RLimitMEM I don't know how I overlooked it before, I went over that file like 4 times and could sware it wasn't even there ha ha

Thanks again.