WordPress.org

Ready to get started?Download WordPress

Forums

[closed] Fatal Error: Out of Memory messages (29 posts)

  1. A2JC4life
    Member
    Posted 3 years ago #

    I have an ongoing issue with these messages. In the past, I was getting them only when attempting to auto-upgrade. Then yesterday I was blocked out of the entire admin area. Removing all plugins removed the error and let me get back in, but I still couldn't auto-upgrade. I tried to re-enable plugins one by one, but I started getting "out of memory" errors in the WordPress Development Blog section of my dashboard. These did not appear to be connected to any specific plugins. (That is, I could swap them out, and I still just ended up getting that error at some point.)

    I do not see a PHP.ini file. Apparently there isn't a local one, but my host said I could create one, so I tried that. 128M. Didn't help.

    I have tried adding the suggested line to my .htaccess file to increase memory, and got a completely different error, which prevented the whole blog from loading at all.

    I have tried adding the recommended line to wp-config, to no effect.

    I have contacted my web host, and they assure me that, 'though they don't want to increase the memory allocation server-wide (apparently that would cause problems of its own), these fixes should allow for the necessary memory on my own account. (I also have two other WordPress blogs on this same server, neither of which has ever had any problems. This one never had an issue, either, until somewhere around version 2.8.)

    Additionally, the numbers that are showing in these error messages don't make sense. It seems to be saying it's running out of memory while there should be plenty left (according to the numbers).

    So what gives? (It's looking to me like some kind of WordPress bug.)

  2. PresentArch
    Member
    Posted 3 years ago #

    I am having very similar problems not seemly related to any one plugin, at some point reinstalling them the site blanks out with the memory message.

  3. esmi
    Forum Moderator
    Posted 3 years ago #

  4. A2JC4life
    Member
    Posted 3 years ago #

    As noted in my original post, I have already tried all of these things.

    (BTW, does anyone have an estimate of approx. how much memory WordPress should be using?)

  5. My php.ini memory limit is set to 32M. Alas, it's more than JUST that, since certain PHP configs use more memory than others.

  6. esmi
    Forum Moderator
    Posted 3 years ago #

  7. A2JC4life
    Member
    Posted 3 years ago #

    So can anyone answer the question about how much memory a typical WP installation should be using? If the solution to this issue is supposedly to just "find a new web host," then the dozens of us with this issue need to know what we're looking for in a host.

    I also am still befuddled by the fact that many of us are getting error messages saying that x space was needed and only y space was available, when x < y.

  8. esmi
    Forum Moderator
    Posted 3 years ago #

    So can anyone answer the question about how much memory a typical WP installation should be using?

    There's no such beast as a "typical WP installation". I commonly only use about 8 plugins. At least one other regular hereabouts has more than 5 times that number, I believe.

    As Ipstenu already suggested, you should aim for at least 32M. How many plugins you can install or whether this limits you in terms of flashy themes is dependant upon your host's PHP config - again as Ipstenu mentioned.

  9. A2JC4life
    Member
    Posted 3 years ago #

    I used a php.ini file to increase the memory to 128M, and it didn't fix the problem. Should my installation really be using that much memory?

  10. A2JC4life
    Member
    Posted 3 years ago #

    Oh, and I should probably mention that that was even with all plugins disabled.

  11. No, WordPress should not be causing that much memory usage.

    I think you have a badly installed/configured PHP.

  12. A2JC4life
    Member
    Posted 3 years ago #

    Can you clarify? What do you mean by badly configured PHP? Are you referring to the WordPress install, the PHP server itself, or something else?

    (I actually deleted ALL of my WordPress files today - except my plugins and themes - and completely reinstalled WP. I'm still having issues.)

    (edited to fix typo)

  13. esmi
    Forum Moderator
    Posted 3 years ago #

    Additionally, not all hosts allow you to increase your memory allocation - which is why Step 4 suggests that you contact them.

  14. charles121
    Member
    Posted 3 years ago #

    THIS WORKS FOR ME:

    ENTER AFTER:
    define('ABSPATH', dirname(__FILE__).'/');

    THE FOLLOWING:

    define('WP_MEMORY_LIMIT', '64M');

  15. A2JC4life
    Member
    Posted 3 years ago #

    I tried all of those. None of them worked. And, yes, my host confirmed that I can increase the memory limit by any of the methods you all suggested.

  16. esmi
    Forum Moderator
    Posted 3 years ago #

    Then ask your hosts for assistance.

  17. Can you clarify? What do you mean by badly configured PHP? Are you referring to the WordPress install, the PHP server itself, or something else?

    PHP server.

  18. charles121
    Member
    Posted 3 years ago #

    THIS WORKS FOR ME:
    THIS TO BE ENTERED IN THE WP-CONFIG FILE WHICH IS IN THE ROOT OF THE WORDPRESS SETUP:

    ENTER AFTER:
    define('ABSPATH', dirname(__FILE__).'/');

    THE FOLLOWING:

    define('WP_MEMORY_LIMIT', '64M');

    I ALSO CREATED A PHP.INI WHICH I UPLOADED TO THE PLUGIN FOLDER IN WP-CONTENT:

    memory_limit = 128M; Maximum amount of memory a script may consume (64MB)
    max_execution_time = 45;
    upload_max_filesize = 10M;
    post_max_size = 20M;

  19. A2JC4life
    Member
    Posted 3 years ago #

    This is the PHP configuration for my server:

    Language Options asp_tags Off
    File Uploads file_uploads On
    Resource Limits max_execution_time 30
    Resource Limits max_input_time 60
    Resource Limits memory_limit 32M
    Data Handling register_globals Off
    Language Options safe_mode Off
    File Uploads upload_max_filesize 2M

    Does anyone see any potential areas for conflict here? I thought that 32M should be plenty for the memory limit, but as noted, it has been addressed locally by a php.ini file, anyway. Is there something "wrong" with one of the other settings?

  20. A2JC4life
    Member
    Posted 3 years ago #

    (I am trying Charles' suggestion, as well.)

    Is there any possibility that a large database could be causing the problem? This blog is 5+ years old, and has a pretty good-size DB. (I don't really understand PHP and SQL and how all of this works together, so that might be a totally stupid question.)

  21. A2JC4life
    Member
    Posted 3 years ago #

    Charles' fix didn't work, either.

  22. Philosopher Rex
    Member
    Posted 3 years ago #

    Hello, I've been having the same problem. I found this post and used the script to verify what wordpress was telling me - that I was out of memory (for me at 40MB).

    I verfied that my global php.ini was really set at 200M with this little script:

    <?php
    phpinfo();
    ?>

    It was so, it seems something was fishy with my host. I then informed my host and linked them to the memory test script (from the above link) and they then admitted that I was on an older server with limited memory and I was only getting 60MB and 20MB of that was being used by the PHP interpreter itself, leaving me with only 40MB. They then 'offered' to move me to a new server for free.

    Long story short, hosts will only give you what they think you need in order to save money. If you put the evidence in their face that they are scrimping, they'll usually back down to keep you as a customer.

  23. maxlife
    Member
    Posted 3 years ago #

    Hi A2JC4life,

    So were you able to resolve this issue? How did you finally address it?

  24. maxlife
    Member
    Posted 3 years ago #

    Problem Solved!!!!!!

    I tried Charles' fix, it did it!!!! You are a life-saver!! Been messing around with codes for 2 days already (without really understanding PHP, etc) trying all these suggestions - thank God this one went through!!!

    Thanks again, Charles :D

  25. A2JC4life
    Member
    Posted 3 years ago #

    Nope; haven't fixed the problem. The consensus seems to be that, yes, WP really is demanding an insane amount of memory and I should just randomly keep increasing my server's memory allowance because nobody cares to identify why WP would be drawing so much memory.

  26. Avid Programmer
    Member
    Posted 3 years ago #

    Hello,

    I know what will fix this error.

    "W3 Total Cache" Plugin

    Browser Cache > check to enable

    Enable HTTP compression and add headers to reduce server load and decrease file load time.

  27. jlukasavige
    Member
    Posted 3 years ago #

    None of these options has worked for me. I'm on 1and1 for hosting.

    I tried the W3 Total Cache plugin with the options you mentioned and that hasn't worked either.

  28. Trancender
    Member
    Posted 2 years ago #

    Tried all of these as well and nothing worked.
    Anybody solve this yet?

  29. esmi
    Forum Moderator
    Posted 2 years ago #

    This is an old post people. Post your own topics.

Topic Closed

This topic has been closed to new replies.

About this Topic