Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5

Thread: Out of memory

  1. #1
    Regular Coder jfreak53's Avatar
    Join Date
    May 2004
    Location
    Guatemala
    Posts
    477
    Thanks
    19
    Thanked 10 Times in 10 Posts

    Out of memory

    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:

    Code:
    key_buffer_size=128M
    read_buffer_size=5M
    sort_buffer_size=10M
    max_connections=500
    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.
    "FORTRAN is not a language. It's a way of turning a multi-million dollar mainframe, into a $50 programmable scientific calculator."
    http://www.microfastcat.com -- FastCat Software, the fastest software on the NET!
    http://www.microthosting.com -- Free reseller web hosting, Hosting, VPS, FREE SMALL HOSTING!!!
    http://www.microtronix-tech.com -- Web design and programming

  • #2
    Senior Coder
    Join Date
    Jul 2009
    Location
    South Yorkshire, England
    Posts
    2,318
    Thanks
    6
    Thanked 304 Times in 303 Posts
    Have you checked that a certain script/function isn't going into an eternal loop or suchlike? That will consume all available memory fast. 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.

  • #3
    Regular Coder jfreak53's Avatar
    Join Date
    May 2004
    Location
    Guatemala
    Posts
    477
    Thanks
    19
    Thanked 10 Times in 10 Posts
    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.
    "FORTRAN is not a language. It's a way of turning a multi-million dollar mainframe, into a $50 programmable scientific calculator."
    http://www.microfastcat.com -- FastCat Software, the fastest software on the NET!
    http://www.microthosting.com -- Free reseller web hosting, Hosting, VPS, FREE SMALL HOSTING!!!
    http://www.microtronix-tech.com -- Web design and programming

  • #4
    Senior Coder
    Join Date
    Jul 2009
    Location
    South Yorkshire, England
    Posts
    2,318
    Thanks
    6
    Thanked 304 Times in 303 Posts
    HTTPD server possibly? What general config differences are there now, (if any), compared to what you had.

  • #5
    Regular Coder jfreak53's Avatar
    Join Date
    May 2004
    Location
    Guatemala
    Posts
    477
    Thanks
    19
    Thanked 10 Times in 10 Posts
    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.
    "FORTRAN is not a language. It's a way of turning a multi-million dollar mainframe, into a $50 programmable scientific calculator."
    http://www.microfastcat.com -- FastCat Software, the fastest software on the NET!
    http://www.microthosting.com -- Free reseller web hosting, Hosting, VPS, FREE SMALL HOSTING!!!
    http://www.microtronix-tech.com -- Web design and programming


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •