WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Fatal error: Out of memory (21 posts)

  1. edengp250
    Member
    Posted 1 year ago #

    i Upgraded my php to version 5.3.17 on my server 2 days ago and since then I get Fatal error: Out of memory when going to my wordpress admin.
    All of my non wordpress sites are not affected.
    So far i have:
    added the line define('WP_MEMORY_LIMIT', '256M'); to config.php

    edited default_constants.php to increase WP memory limits.

    got my hoast to scan all of my files for anything that would be preventing WP from using memory, they found nothing after an 18 hour scan.

    increased memory limit in php.ini to 512mb.

    My host has checked my php configuration and confirmed that all is set correctly and that memory limits on the server are set high enough, (512MB)

    My host has spent the best part of 2 days trying to find a problem with my server and have found nothing.

    I have the exact same problem on 7 sites with wordpress installations.
    The reason I updated my servers PHP version was because while trying to update my wordpress sites to the latest version using the auto update in the admin i kept getting memory error.
    I have now manually updated all the wordpress sites and have even installed a fresh new install which also has the same problem.

    they have now referred me to wordpress to find a solution so here I am!

  2. s_ha_dum
    Member
    Posted 1 year ago #

    What is the actual, complete error?

  3. edengp250
    Member
    Posted 1 year ago #

    it depends,
    I have disabled all plugins now which has at least let me get into the admin area.

    if i try to reinstall version 3.4.2 i get this with in wordpress

    Fatal error: Out of memory (allocated 9437184) (tried to allocate 995832 bytes) in /home/lambrett/public_html/wp-admin/includes/update.php on line 288

    on the admin home page i have this all the time:

    Incoming Links

    Fatal error: Out of memory (allocated 9961472) (tried to allocate 7680 bytes) in /home/lambrett/public_html/wp-includes/class-simplepie.php on line 13315

    Plugins

    Fatal error: Out of memory (allocated 9961472) (tried to allocate 30720 bytes) in /home/lambrett/public_html/wp-includes/class-simplepie.php on line 12791

    WordPress Development Blog

    Fatal error: Out of memory (allocated 9961472) (tried to allocate 30720 bytes) in /home/lambrett/public_html/wp-includes/class-simplepie.php on line 12791

    if i try to install a few plugins i get this:

    Fatal error: Out of memory (allocated 10223616) (tried to allocate 491520 bytes) in /home/lambrett/public_html/wp-content/plugins/phpZon/amazon.php on line 23

    i can get phpzon to activate if i deactivate every other plugin but then when i try to activate the other plugins again 1 or 2 will give another error.

    its not the plugins pulling all the memory and in any case the amount they are trying to allocate is much much less than the server limit and the WP max memory limit which is set as in my post above.

  4. s_ha_dum
    Member
    Posted 1 year ago #

    All of those are right at 10MB. What is the actual RAM (or allocated RAM) on the server? 10MB available is pretty low.

  5. edengp250
    Member
    Posted 1 year ago #

    As said above php is set to 512MB
    server has 786MB guaranteed RAM
    and 1.5GB Burst RAM

    the server shows no sign of getting anywhere near 768MB at any time which is why the host has referred me here, its wordpress not the server!

  6. s_ha_dum
    Member
    Posted 1 year ago #

    As said above php is set to 512MB...

    Yes, but you can set it to anything you want and it doesn't matter if the memory isn't there.

    the server shows no sign of getting anywhere near 768MB at any time which is why the host has referred me here, its wordpress not the server!

    It seems to me like the server has to be getting very near that 768MB, or even the 1.5GB. PHP is using, in your last example, 10.223616MB and is asking for .491520MB more, so PHP, and hence WordPress, is asking for less than 12MB total, which is 1/3rd WordPress' default memory limit.

    Based on those numbers it would take about 65.5 concurrent (down to half a second or so) connections to get to the 786MB or 128 concurrent connections to hit the burst limit. That is a tremendous amount of traffic. Do you get bursts of that much traffic (among all the sites on that server)?

    Have you tried a caching plugin?

  7. edengp250
    Member
    Posted 1 year ago #

    The server stats show that memory isnt getting near 786 at any time.

    Mem: 1572864 606104 966760 0 0 0
    -/+ buffers/cache: 606104 966760
    Swap: 0 0 0
    Total: 1572864 606104 966760

    I have a heavily moded phpbb3 forum on the same server that gets a lot of traffic (40k page views by 2k visitors a day average) compared to the wordpress sites which never has any memory issues.

    wordpress only started doing this after php on my server was updated to 5.3.17 from 5.2.XX. all my other non wordpress sites run a lot faster after the update and have NO memory issues!
    surely if it was a server side problem the other php sites would be showing some problems too?

  8. halty
    Member
    Posted 1 year ago #

    This is clearly a PHP configuration issue. Check memory_limit in your php.ini - I bet it is set to 10M :)

  9. s_ha_dum
    Member
    Posted 1 year ago #

    @halty, in the initial post edengp250 says that he or she "increased memory limit in php.ini to 512mb."

    @edengp250, that looks like the output from free. That is going to be a snapshot of memory usage on a split-second scale. It isn't really an average, or a statistic. Are you running it with the -m option to output in megabytes?

  10. halty
    Member
    Posted 1 year ago #

    s_ha_dum:
    Thank you, I have missed that part.

    edengp250:
    I would really want to see the output of phpinfo(). It is quite possible that there is another php.ini file being loaded and not the one that is being changed. I've also seen imagick installations breaking memory_limit, but it was a bit different in my case. Anyway, phpinfo() should reveal the issue.

  11. edengp250
    Member
    Posted 1 year ago #

    I was told by my host that they had looked for another php.ini file and didnt find any.

    http://lambretta-parts-for-sale.com/phpinfo.php

    Could it be eAccelerator?

  12. halty
    Member
    Posted 1 year ago #

    Is this phpinfo.php located in the root of your "broken" wordpress? If not, can you please move it over there?

    I doubt it is eAccelerator, but you can always try disabling it.

  13. s_ha_dum
    Member
    Posted 1 year ago #

    I guess it could be eAccelerator. I've only browsed the docs briefly but it looks that would increase memory usage. It saves compiled code in memory and cuts out some overhead. It should be fine if you have the memory.

    PHP's memory is 512MB, which probably isn't bad. What is allocated to MySQL (I am assuming the database is on the same server)?

  14. edengp250
    Member
    Posted 1 year ago #

    yes its in the root

  15. halty
    Member
    Posted 1 year ago #

    Then I would try disabling all PHP extensions. Look in your php.ini for lines like:

    extension=extension_name.so
    and comment them out.

    Then restart Apache.

    If this does not help, then I would update all system libs and recompile PHP from scratch.

  16. Tish
    Member
    Posted 1 year ago #

    If you do get a fix for this, please reply. I have been having the same issue for a week on all of my wp sites. I am using cpanel and have tried installing wp both manually and with the one-click cpanel install. I get the fatal error on every one. I just moved to cpanel a couple of weeks ago and am planning to transfer sites over to new IPs, so these are all fresh installs--meaning, as of yet, there are no plugins to disable and nothing customized on any of these sites.

    Thanks!

  17. edengp250
    Member
    Posted 1 year ago #

    been busy, but i'm looking at it tonight.

  18. edengp250
    Member
    Posted 1 year ago #

    I disabled all PHP extensions then restarted Apache, still the same memory errors in wordpress.

    i have then recompiled and still have the same memory errors!

    is anyone here who has replied in this topic using php version 5.3.17 ?

  19. Tish
    Member
    Posted 1 year ago #

    Mine is finally working correctly. I contacted my hosting provider (Godaddy), and here is the response:

    We understand you are seeing memory limit errors when attempting to load WordPress on your server via cPanel. In reviewing online, we were able to find some relevant articles on this issue, specifically:

    http://forums.cpanel.net/f5/fatal-error-out-memory-202111.html

    As a courtesy, we backed up your php.ini and httpd.conf files and made the changes suggested to the php.ini memory limit and the httpd.conf's RLimitMEM setting. We restarted Apache and you should now be able to load WordPress without seeing this issue.

    Truly, I'd tried all of these myself over the last several days, but I guess something finally clicked. Anyway, I know there are a lot of posts on this, so perhaps the link Godaddy used is the most authoritative on the subject. ? Who the heck knows.

  20. Tish
    Member
    Posted 1 year ago #

    My "server version" of PHP is 5.5.27 (in PHPMyAdmin). Is that what you're asking? Not sure where to find this info.

  21. edengp250
    Member
    Posted 1 year ago #

    very interesting, this kinds worked, im still getting memory errors in the wordpress dashboard home page under "incoming links" "plugins" and "development blog" but i can now activate all my plugins and use the dashboard auto update.
    i can live with out the dashboard home page items.

    thanks Tish :)

    I did want to mention that memory_limit in the /usr/local/lib/php.ini is not the only location where you might exceed the memory limit. If you have RLimitMEM in /usr/local/apache/conf/httpd.conf set, it might cause the same issue. You can search to see if that's in the file:

    grep -i rlimit /usr/local/apache/conf/httpd.conf

    If it is in the file, try commenting it out (using # in front of RLimitMEM line), then restart Apache to see if the site begins working.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.