Fatal error: Allowed memory size of 67108864 bytes exhausted

Discussion in 'Troubleshooting' started by freshk, Dec 12, 2011.

  1. freshk

    freshk aMember Pro Customer

    Joined:
    Feb 14, 2008
    Messages:
    12
    I am getting this error when logging into my members area via a paid member.
    Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 13637116 bytes) in members/plugins/db/mysql/mysql.inc.php on line 1626

    It also says

    MYSQL Error happened, script stopped. Website admin can find more details about the problem at CP -> Error Log
    • When I check the error logs there is nothing.
    I am not sure what I have done wrong, maybe my product setup is incorrect?I have also upped my memory usage in my wp-config file. I have been on chat with my hosting company all morning. This is a large project that has a deadline and I am afraid I might have to rethink amember if I can not get it figured out.

    I have also had a trouble ticket opened for going on 3 days now. Just so everyone knows the plugin seeming to have the problem would be a amember_MU plugin provided by amember.
    Please someone help me.
    If needed I can pay as well.
    Thanks,Candace
    P.S I am using
    amember - 3.2.4PRO
    Wordpress Multisite - 3.2.1
  2. skippybosco

    skippybosco CGI-Central Partner Staff Member

    Joined:
    Aug 22, 2006
    Messages:
    2,526
    From the error it looks like you only have 64MB of memory allocated for PHP/aMember to use?

    Ask your host to up this to 128MB
  3. freshk

    freshk aMember Pro Customer

    Joined:
    Feb 14, 2008
    Messages:
    12
    I already requested this from the hosting company. So that is not the problem... I also had support say they upped the memory and everything should be fixed, however it is not. I still have the error.
    Any other ideas?
  4. skippybosco

    skippybosco CGI-Central Partner Staff Member

    Joined:
    Aug 22, 2006
    Messages:
    2,526
    Well are you getting the same error message (ie. Allowed memory size of 67108864).

    Logged on as admin, go to Maintenance. What is the memory_limit set to? If it still says ~64MB they need to adjust your PHP configuration to allow eFront to make use of it.
  5. trainsem

    trainsem Member

    Joined:
    Aug 5, 2011
    Messages:
    48
    Got a couple of these errors. First noticed when I tried to access the signup page:
    Checked php.ini and noted that memory allocation is 32 MB.

    Tried to find "Maintenance" but it must be renamed in 4.1.9 Pro.

    Tried Setup > Configuration, got:
    If my memory allocation isn't enough, it would be nice if I were warned of this when aMember was installed.

    I doubled the VPS memory_limit to 64M and rebooted but the above errors have not gone away!

    How can this happen? (Ticket raised)
  6. skippybosco

    skippybosco CGI-Central Partner Staff Member

    Joined:
    Aug 22, 2006
    Messages:
    2,526
    Did you update your php.ini to 64 when you upgraded your VPS? Is the error the same (ie. allocated 28311552)

    The amount of memory can vary based on a number of things (number of users, number of products, number of plugins, etc), but I typically suggest a minimum of 128MB for a production server running v3 or v4 of aMember.
  7. trainsem

    trainsem Member

    Joined:
    Aug 5, 2011
    Messages:
    48
    Thanks, skippybosco. No, I haven't upgraded my VPS. I just updated php.ini (via WHM) to 64M a few minutes ago, before writing the above post. I later went to eFront and couldn't get in, owing to a very similar error. I think I have solved it, so I will document it for anyone else to consider.

    Probable Cause
    My probable error started a few days ago, when I was in my VPS' WHM > Apache Configuration, which has a feature called Memory Usage Restrictions. Unlike other tools in WHM, this one just goes ahead and changes the RLimitMEM value based on previous usage. In my case, the value (in httpd.conf) was 55924053.

    After reading about my error in other forums, I saw a lot of advice to increase the value of memory_limit in php.ini, including one example upping it to 999M! Luckily I saw other comments suggesting that this isn't the way to tame scripts with memory leaks and to also check Apache's httpd.conf for the RLimitMEM value.

    Solution
    If you have root access (VPS or dedicated server), look for this value by typing at an SSH prompt:
    Code:
    grep -i rlimit /usr/local/apache/conf/httpd.conf
    If there is a value, e.g. RLimitMEM 55924053, comment it out with "# " and restart Apache.

    This fixed my problem. Also consider skippybosco's advice above to up the PHP memory_limit to 128M.
  8. alexander

    alexander Administrator Staff Member

    Joined:
    Jan 8, 2003
    Messages:
    6,274
    Thanks for the info!
  9. fonderco

    fonderco aMember Pro Customer

    Joined:
    Mar 7, 2010
    Messages:
    27
    I keep getting these when users try to purchase...

    I have upded from 64M to 128M to 256M in php.ini... But that doesn't help. Ideas?

    [client XXX.XXX.XXX.XXX] PHP Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 62923913 bytes) in /home/XXXXX/public_html/members/plugins/db/mysql/mysql.inc.php on line 1599, referer: https://XXXXX.com/members/plugins/p...on=mfp&payment_id=433&member_id=132&v=XXXXXXX
  10. alexander

    alexander Administrator Staff Member

    Joined:
    Jan 8, 2003
    Messages:
    6,274
    Please submit ticket to helpdesk. We will troubleshoot this.

Share This Page