WordPress Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 77 bytes) in wp-includes/wp-db.php on line 1832

前端 未结 4 956
礼貌的吻别
礼貌的吻别 2021-01-15 05:19

I noticed recently on my WordPress website I\'m getting sometimes 500 Internal Server Error. I checked logs and I have many lines like:

[Mon Oct 03 01

相关标签:
4条回答
  • 2021-01-15 05:23

    The problem was caused by iThemes Security plugin. I turned off it and errors have gone. I'll investigate this problem more and edit this answer if I'll know what part of this plugin caused exceeding memory limit.

    0 讨论(0)
  • 2021-01-15 05:27

    I had the same issue with "wp-db.php on line 1832" and disabling iThemes Security plugin as was mentioned before worked well for me. However, if you still need to protect your site it's not the solution.

    What you need to do is to fix directory permissions of key areas such as wp-content, wp-includes etc...

    Go to iThemes Security settings -> File Permissions (Configure Settings) and check if all permissions are set properly. Once you fix permissions as they supposed to be, you won't see that error anymore.

    0 讨论(0)
  • 2021-01-15 05:44

    The constant WP_MEMORY_LIMIT regulates RAM for all PHP processes for WordPress for the front and backends. Use this on shared hosting. The constant WP_MAX_MEMORY_LIMIT regulates RAM for the backend only. You use WP_MAX_MEMORY_LIMIT when you know you have enough RAM and can use it all, such as on a VPS server you administer.

    Go back to

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

    and remove those queries you are running (above) and see if the site comes back up. If it does, that's the issue; working on those queries is a different issue.

    If this is shared hosting, you are killing the server with those queries; if this is your own server, you need to configure MySQL/PHP for caching and high loads.

    0 讨论(0)
  • 2021-01-15 05:49

    Disable the "Database Backups" in iThemes Security works for me.

    0 讨论(0)
提交回复
热议问题