Question

Update The end result is that I did not account for Apache memory limits. There were limits placed on the Apache process which caused PHP to be limited regardless of the settings placed on it. Changing these values in httpd.conf, helped.

Hello,

I am encountering an error with a recently launched site that although the pages display, I am severely limited by the number of plugin's that I can enable.

We started to see an error occur:

Fatal error: Out of memory (allocated 24903680) (tried to allocate 1802297 bytes) in /home/normal/public_html/normalpl.org/wp-includes/wp-db.php on line 791

Now we have tried the usual fixes of increasing PHP and Wordpress memory allocations (have a VPS, with full root) all the way up to 256MB but with no affect on the error.

The following are the plugins enabled:

CMS Tree Page View WP-DBManager Login Lockdown Contact Form 7

Now enabling any other plugins will start to cause these memory errors to occur. Almost always on Post/Page save operations. Notably, All in One SEO or Yoast SEO or W3 Total Cache, but others will also cause this to occur.

I noticed that in the database there were some strange Unicode Code Points that had been brought in by a cut/paste from Word and so I went through all of the Posts/Pages and escaped all of the entities so that they were not unicode but HTML Entities.

Unfortunately, the error was still occurring upon enabling one of the above plugins and saving a post/page.

I wiped out all files/configurations and started with a fresh install of Wordpress and re-imported the existing database to make sure there wasn't something strange in the files and I still encountered the issue.

I feel that I am stuck on thinking that there is some strange escaping bug going on when it hits that mysql_real_escape_string function as removing that and just dumping the plain string into the database works (but is horrible for XSS and proper MySQL escaping).

In addition, the error happens when using the older method of Add_Slashes, and I also noticed that Magic_Quotes_GPC is on if that helps. Thanks for all of the assistance, this is a baffling one for me.

-Adam

Was it helpful?

Solution

If you suspect content-specific issue, I'd first try to start with clean site and set of test content instead ( official Theme Unit Test data for example).

If processing content is indeed at fault this is quite unusual issue. If you can narrow it down to specific function it might be possible to build some kind of test case, by getting content directly from database and running it through that function, while measuring resource consumption.

Licensed under: CC-BY-SA with attribution
Not affiliated with wordpress.stackexchange
scroll top