• I’ve had several different people work on screencomment.com and an error has appeared. the entire site vanishes and instead this error message appears:

    Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 35 bytes) in /home/content/96/7854096/html/site/wp-includes/wp-db.php on line 1938

    I’ve spoken to the host (godaddy) and they increased the memory, yet the problem keeps appearing. They said someone needs to troubleshoot the php script because it’s not using the php memory properly.

    Does anyone have any advice? I have no background in coding, I’m not a developer.
    Please help thanks

Viewing 14 replies - 1 through 14 (of 14 total)
  • Try adding this to your wp-config.php

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

    Thread Starter alinaderzad

    (@alinaderzad)

    how do i access this?
    is it in wordpress? or is it in the server?

    It would be on the server in the root of the WordPress installation. You can access it via FTP, cPanel file manager, etc.

    Thread Starter alinaderzad

    (@alinaderzad)

    I found the file but how do I edit it?
    and where would I place this code?

    I found the file but how do I edit it?

    Depends on what you are using to view the file. Typically, you’d want to download the file locally, make your changes in something like Notepad++ or whatever your preferred text editor is then upload it back.

    and where would I place this code?

    Add that line above the /* That's all, stop editing! Happy blogging. */

    Note: Make sure it’s outside of any /* */. There will also be other define functions in your wp-config.php you can use as a placement guide.

    Thread Starter alinaderzad

    (@alinaderzad)

    ok
    now before I do any of this, is there anyway to back up the wp-config file?
    how do I do that?
    (i’m in mac)
    just drag the file onto the desktop to copy it, and that would be like backing it up, right?

    if anything goes wrong, I can just drop that backed up file back into the server?

    please confirm

    Yes, totally, always back up. Just download it locally, make a copy that you can upload back to if need be.

    Thread Starter alinaderzad

    (@alinaderzad)

    ok, thanks

    Thread Starter alinaderzad

    (@alinaderzad)

    one last question (for now)
    if an error does occur, merely uploading the backed up file back to server will reverse the error I possibly will make?
    errors aren’t gonna occur in other areas as a result?
    please confirm

    Thread Starter alinaderzad

    (@alinaderzad)

    ok, it’s done
    thanks again

    Hi alinaderzad,

    I have the same exact problems exact line and same hosting. Did you solve the issue?

    Donald

    Hi Craig Ralston,

    is there a reason why the memory limit should set to 96 Mb?
    Is this setting related with the memory limit that a plug-in or function can use?
    Thanks in advance,
    Donald

    Hi Donald.

    The above explanation of 96MB doesn’t make a lot of sense considering the error was:

    “134217728 bytes”

    Which is 134MB. So setting a 96MB limit when they are already using ~130MB would likely not help.

    >> Is this setting related with the memory limit that a plug-in or function can use?

    It depends. You may also contact your host to define a custom php.ini file with memory_limit=128M (or whatever your site requires).

    Hi John,

    thanks for the info.
    I would like to reply here about my problem but I suppose I will create a mess cross posting so if you like to read my post and the issue I am having you are more than welcome:
    https://www.ads-software.com/support/topic/fatal-error-allowed-memory-in-wp-dbphp-1?replies=5

    Regards
    Donald

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘PHP script not using memory allowance properly’ is closed to new replies.