• I keep seeing following error in my logs:

    httpd: PHP Fatal error:  Allowed memory size of 1073741824 bytes exhausted (tried to allocate 72 bytes) in /X/wordpress/wp-includes/wp-db.php on line 2255

    I tried increasing memory_limit inside of php.ini to 1G already

    # grep memory_limit /usr/local/etc/php.ini
    memory_limit = 1024M
    #

    yet still error appears,

    I’m reaching out to WordPress for help!
    Please advise.
    Thanks!

Viewing 5 replies - 1 through 5 (of 5 total)
  • Moderator t-p

    (@t-p)

    1G is seems to be lot of memory.

    may be something else is going on.

    Have you tried: – Flushing any caching plugins you might be running, as well as server and/or browser caches. Also, any op cache or content network cache, as well as Cloudflare, clear those caches.
    – deactivating ALL (yes all) plugins temporarily to see if this resolves the problem (plugin functions can interfere). If this works, re-activate them individually (one-by-one) to find the problematic plugin(s).
    – If you can’t get into your admin dashboard, try resetting the plugins folder by FTP. Sometimes, an apparently inactive plugin can still cause problems. Also remember to deactivate any plugins in the mu-plugins folder (if you have created such folder). The easiest way is to rename that folder to mu-plugins-old.
    – switching to the unedited default Twenty Fifteen theme for a moment using the WP dashboard to rule out any theme-specific issue (theme functions can interfere like plugins). If you don’t have access to your admin area, use FTP , or your web-host’s cPanel or whatever file management application your host provides. Navigate to /wp-content/themes/ and switch to the default theme by renaming your current theme’s folder by adding “-old” to the end of the folder name. Alternately, you can remove other themes except the default theme. That will force your site to use it.

    Thread Starter a1exus

    (@a1exus)

    Thank you for your response.

    I do too think that 1G is very high, and that’s why I put it back to 128M as of now.

    although according to log, problematic file PHP pointing to is: wordpress/wp-includes/wp-db.php

    however, I went ahead and flushed all caches regardless, not sure if that would do any good, but I’m giving it a try anyways)

    I do not know how to replicate this issue or what exactly is causing it, so I’m going to hold off on disabling all plugins at the moment.

    and in regards to theme, I am using Twenty Fifteen theme (unedited)

    once again, since it was wp-includes/wp-db.php, I believe this is belongs to core of wordpress rather then plugin and/or theme.

    if you or anyone else have any other suggestions, i’m all ear)

    Moderator Samuel Wood (Otto)

    (@otto42)

    www.ads-software.com Admin

    Just because the error references a core file does not mean it’s a core issue. That’s just where the problem occurred, it doesn’t tell you what caused the problem to occur in the first place.

    That specific line is in the get_results function in the database code. So, something is attempting to get data from the database, and it’s trying to get more than a gigabyte of it. Which is clearly a lot, so definitely examine your plugins and themes and see what they might be doing that needs so much data from the database.

    Thread Starter a1exus

    (@a1exus)

    Thank you for your reply as well, and I totally get what you’re saying, even though my whole database is on a small side (under 100MB), I am trying to figure out the way to find out who’s exactly is causing that behavior. As for theme I use standard twenty fifteen and it is unmodified, so as of now, I’m going to assume theme is Ok and go to plugin part…

    I try to use very popular and well supported plugins to avoid that kind of scenario, so it’s really hard to put blame on one of plugins, but I gotta start troubleshooting somewhere…

    I use followings, maybe right off the bet you can point on one or two:

    $ wp plugin list | grep -v inactive
    +--------------------------+----------+--------+-----------+
    | name                     | status   | update | version   |
    +--------------------------+----------+--------+-----------+
    | akismet                  | active   | none   | 3.1.3     |
    | all-in-one-seo-pack      | active   | none   | 2.2.7.1   |
    | bad-behavior             | active   | none   | 2.2.16    |
    | contact-form-7           | active   | none   | 4.2.2     |
    | exec-php                 | active   | none   | 4.9       |
    | facebook                 | active   | none   | 1.5.5     |
    | google-analyticator      | active   | none   | 6.4.9.6   |
    | google-sitemap-generator | active   | none   | 4.0.8     |
    | hello                    | active   | none   | 1.6       |
    | instagram-for-wordpress  | active   | none   | 2.0.9     |
    | better-wp-security       | active   | none   | 4.9.0     |
    | jetpack                  | active   | none   | 3.6.1     |
    | opcache                  | active   | none   | 0.3.1     |
    | twitter                  | active   | none   | 1.1.0     |
    | wp-db-backup             | active   | none   | 2.3.0     |
    | wp-recaptcha             | active   | none   | 4.1       |
    | wp-super-cache           | active   | none   | 1.4.4     |
    +--------------------------+----------+--------+-----------+
    $

    unfortunately I don’t know how to replicate my issue, so disabling plugins one by one is not sufficient…

    Moderator t-p

    (@t-p)

    please read my previous reply and follow the steps to troubleshoot.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘PHP Fatal error: Allowed memory size of X bytes exhausted’ is closed to new replies.