• Recently my wordpress site has been getting intermittent out of memory errors, like the following:

    Fatal error: Out of memory (allocated 64487424) (tried to allocate 44 bytes) in /homepages/37/d503644658/htdocs/public_html/rants/wp-includes/wp-db.php on line 1775

    Often, simply reloading the page will cause the out of memory condition to temporarily go away, and I can use the site, but I want to up my memory allocation and stop getting these errors entirely.

    I am self-hosting my wp site with 1and1, and I think I found the settings for PHP and it says that my PHP.INI file has a memory_limit of 81M set, which should be plenty. But when I’m in the wp-admin area of my site, wordpress reports that it has a memory_limit of 40M, and when a page does render, it is consuming ~38M.

    Where do I need to look to find and change this limit? What should I increase to? Is it safe to use the full 81M allowed by my 1and1 hosting package, or should I select a lesser amount, like 64M?

Viewing 13 replies - 1 through 13 (of 13 total)
  • Open your site in Chrome. Hit F12. Make sure “Console” is underlined. You will see a bunch (technical term) of error warnings. Very possible some of these are causing your problem.

    Thread Starter csanyk

    (@csanyk)

    When I get the error, the Console is empty.

    Please provide a link.

    Thread Starter csanyk

    (@csanyk)

    Might want to create an info.php file with the following:

    <?php
    phpinfo();
    ?>

    Place one in your blog’s directory and one in you /wp-admin/ directory and execute them.

    See what the memory_limit value is for each. Also see what the Loaded Configuration File is. Just make sure they are pointing to the same file and where it is. I’ve got mine set to 128M.

    Thread Starter csanyk

    (@csanyk)

    MarkRH, I tried what you said, but if I try to access the file, my site just serves a “page not found”.

    Could someone please just respond to this thread and tell me the various ways in which my wp site might have its php settings configured, so I can check each of them, and what the best practice is, so I can set it properly?

    Thanks!

    You are redirecting a lot of WordPress from https://csanyk.com/rants. The file you want is probably in the rants folder. You can also find it by using the file manager your host provides.

    Thread Starter csanyk

    (@csanyk)

    I’m aware I’m redirecting. What is “the file I want”?

    Thread Starter csanyk

    (@csanyk)

    I figured it out. Both /rants and /rants/wp-admin are reporting a php memory limit of 128MB.

    But if I browse my admin pages, it’s reporting a memory limit of 40M at the footer of the page (I have a plugin installed that is supplying me this info; it seems accurate given that I am getting out of memory errors.)

    Thread Starter csanyk

    (@csanyk)

    Actually I may have been mistaken about that.

    I’m using a plugin called Server IP & Memory Usage Display, and at the foot of my admin pages, it provides the following statistics:

    | Memory: 35.13 of 268435456 MB (0%) | WP LIMIT: 40 MB | IP 162.222.203.155 (icpu3454) | PHP 5.6.24 @32BitOS

    268435456 MB is obviously inaccurate, as that’s terabytes of memory. What I had *thought* was the PHP memory limit (40M) actually appears to be the WP file upload limit.

    So now I’m wondering why I’m getting out of memory errors, and what my true memory limit is for php, if it’s 128MB as reported by phpinfo() or if something is messing with that, causing Server IP & Memory Usage Display to report a corrupted value.

    The file MarkRH was speaking of is at https://csanyk.com/rants/info.php

    Have you talked to your host? They may have the answers you are looking for.

    Thread Starter csanyk

    (@csanyk)

    They’re not usually very helpful, as they don’t support all the customization I’ve done with my wp install, but they’re my next stop if I can’t get a resolution here.

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘PHP out of memory’ is closed to new replies.