Skip Navigation

[Resolved] Query Error with large data set

This support ticket is created 5 years, 9 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

Tagged: 

This topic contains 3 replies, has 2 voices.

Last updated by TJS3586 5 years, 9 months ago.

Assisted by: Christian Cox.

Author
Posts
#1183749

We have a toolset post type with a very large number of records that has recently started to cause problems on the site. There are roughly 110,000 records of this post type.
The site front-end works fine. Views and searches of that content type work fine.
We're stuck when editing a Basic Page (or any content item) in the Divi editor. At the most basic level, when creating a new blank page, then loading the Divi editor (classic editor), we receive an AJAX 500 error. This error prevents the loading of custom divi templates, which is a problem for our client.

Web log error message:
AH01071: Got error 'PHP message: PHP Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 20480 bytes) in /var/www/docroot/wp-includes/wp-db.php on line 1889\n', referer: hidden link

That error is a test on a local instance with 256mb of memory allocated. The live site is running over 700mb of memory and still has the issue.

Disabling the content type with 110,000+ records see the error disappear, and library template layouts load normally again.
By deleting 100,000 of the records (left with around 10,000), the issue goes away. This doesn't really help us as we need all of those records.

It seems like some type of query is touching on that very large set of custom posts, even though we're working on a basic page.

#1183810

Hi, I can try running a script to generate some custom posts programmatically to replicate this setup. In the meantime, can you run some tests as well?
- Temporarily deactivate all plugins except Types and Views, then activate the parent Divi theme. Test again. If the problem is resolved, reactivate your child theme and other plugins one by one until the problem returns. Try to isolate a single source of conflict.
- If limiting plugin and theme conflicts doesn't solve the problem, create a backup of the current local database. Then modify the post type slug of all these custom posts to be "post". Deactivate all Toolset plugins and try again. This should help determine whether the problem is Toolset-specific.

Let me know what you find out and I will update you tomorrow with some findings of my tests.

#1184318

It turns out that I was able to reproduce a similar problem in the Divi Builder without any Toolset plugins active. I created about 105k Posts (native WordPress posts), and attempted to edit one of the posts using Divi Builder. When I tried to save the update, a Fatal error was triggered. So I think the issue should be addressed with the Divi support team, since Toolset isn't directly involved in this case.

#1184454

Thank you! Hadn't considered that possibility. We'll tackle the Divi angle ourselves.