0

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

1 Answer 1

0

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.

2
  • I am setting up a local MAMP instance to replicate the website and see if I can get the same issue to occur locally. The wierdest thing is that I had a development site on the same server, configured the same way with the same database issue and it would not experience it at the same level as the primary site. Now that could have been due to the amount of people visiting (not a large amount on either) but strange nonetheless. I am going to attempt to debug it and see where it is breaking specifically.
    – alistek
    Jun 1, 2011 at 22:03
  • 1
    For anyone who is curious what the end result of this was, it appears that there were limits being set in Apache. So no matter how high I would set the PHP limits, they couldn't exceed what the lower Apache limits were, removing those limits now allows Wordpress to function at full capacity.
    – alistek
    Jun 3, 2011 at 6:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.