• anstalt

    (@anstalt)


    Hi folks,

    On one of our client’s sites, a single post keeps returning Server 500 error when we try to edit it. No other posts on the server cause this problem.

    After turning on debug mode, I can see the following error when I try to edit the post:

    Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 91 bytes) in /home/<client>/public_html/wp-includes/meta.php on line 837

    Weirdly, line 837 in meta.php is a comment, but the previous bit of code is the following:

    public $queries = array();

    I’ve done extensive searching on the issue but nothing has helped. This is a server we own, so I increased the memory limit to 1gb to see if that fixed it. I changed the memory limit in php.ini, but it didnt help, the error stayed the same. I checked .htaccess and wp-config to ensure the memory limit wasn’t being overwritten. It wasn’t.

    My next step was to uninstall any plugins we were no longer using, but that didn’t help. Unfortunately, we do have a lot of plugins but we use them all over our site.

    My final bit of investigation was to look at the database. This is the only place which has given me a clue as to the problem. The post had it’s main entry, one autosave plus 15 or so revisions stored in the database. Deleting all of the revisions from the database temporarily fixed the issue. However, as soon as we start making changes, the problem eventually returns. This seems to happen regardless of what we amend.

    Has anyone encountered a similar error? Looking at the database, does anyone know of a reason why storing lots of revisions might be causing the problem?

    Thanks for your time

Viewing 3 replies - 1 through 3 (of 3 total)
  • esmi

    (@esmi)

    This sounds like a server issue – not a WordPress one. The error message indicates that the site has only 134M of memory allocated to it.

    Thread Starter anstalt

    (@anstalt)

    As I said in my post, I’ve updated the php.ini to increase available memory to 1GB. I tested this independently and the increase worked but didn’t affect this particular error.

    To ensure I wasn’t overwriting this value, I checked wp-config.php and the .htaccess files. I wasn’t overwriting the value, but just in case, I also set the max memory limit to 1gb in both htaccess and wp-config to see if it helped, but it still didn’t.

    esmi

    (@esmi)

    As I said in my post, I’ve updated the php.ini to increase available memory to 1GB. I tested this independently and the increase worked but didn’t affect this particular error

    I did understand that from your earlier post but the fact that the error message still refers to 134M suggests that there is a problem with the server reading or implementing the memory changes in your php.ini file. As this is a server problem, it’s outside what WordPress can control or we can really help you with.

    Do you have a dedicated server admin person that you could speak to about this?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Single post returning Server 500 Error when trying to edit’ is closed to new replies.