The Grid with WPML is slowing down our site

Hi there, we’re using The Grid on a multilingual site (using WPML which the The Grid says it supports) however our sites started slowing right down to the put they can take up to 30 seconds to load sometimes. Our host and developer found that The Grid is causing very long MySQL requests. This is a lot from the log.

SELECT wp_28_posts.*,NOW() FROM wp_28_posts LEFT JOIN wp_28_postmeta ON ( wp_28_posts.ID = wp_28_postmeta.post_id ) LEFT JOIN wp_28_postmeta AS mt1 ON (wp_28_posts.ID = mt1.post_id AND mt1.meta_key = ‘the_grid_language’ ) WHERE 1=1 AND ( ( ( wp_28_postmeta.meta_key = ‘the_grid_language’ AND wp_28_postmeta.meta_value LIKE ‘%en%’ ) OR mt1.post_id IS NULL ) ) AND wp_28_posts.post_type = ‘the_grid’ AND ((wp_28_posts.post_status <> ‘trash’ AND wp_28_posts.post_status <> ‘auto-draft’ AND wp_28_posts.post_status <> ‘flamingo-spam’ AND wp_28_posts.post_status <> ‘tco-data’)) GROUP BY wp_28_posts.ID ORDER BY wp_28_posts.post_modified DESC;

Any solutions here? our sites are becoming unaccessible for parts of the day because of it.

Hello @lifehouseglobal,

Thanks for writing in! Could you please update to the latest versions?
Our latest versions are:

  • Pro theme 3.2.3 or
  • X theme 7.2.3
  • Cornerstone 4.2.3
  • WPML 4.3.18
  • The Grid 2.7.8
  • WP 5.5.1

This latest release contains fixes for several issues so be sure to check out the changelog:

After doing the updates, always remember to clear all caches (if you are using WP Rocket, WP SuperCache or W3 Total Cache) when updating so that the code from the latest release is always in use. This will help you to avoid any potential errors.

It could also be caused by a plugin conflict, amongst other things. Please check out this troubleshooting article here and follow the instructions for the following sections (where appropriate):

  • Testing for Plugin Conflict
  • Theme Update
  • Child Theme
  • CSS/JS Customization
  • Increasing PHP Memory Limit
  • Disabling Cache
  • Disabling CDN

If nothing is helping, provide us access to your site so that we can check your settings. Please create a secure note with the following info:
– Link to your site
– WP login URL
– WP username
– WP password
– WP Administrator Role

To know how to create a secure note, please check this out: How The Forum Works

Please let us know how it goes.

Thanks for the quick response.

Everything is up to date and no difference.

Will put our login details in a secure note,

thanks!

Hi @lifehouseglobal,

Thanks for the credentials, but it does not let us logged in and shows captcha, even that validate properly. On multiple tries, it shows Error 524.

Can you please check and send the credentials again.
NOTE: In case multisite, please mention the site name where you are getting the error.

Thanks

Hi there,

Please try again, I just checked now and it’s fine from here. (due to this problem with the Grid it’s been coming on and offline when it’s sucking all the server’s resources)- also turned Captcha off.

Hi @lifehouseglobal,

Can you please make sure that you have already troubleshot the common issues mentioned by my colleague, if not please go through it:

1.Plugin Conflict
2.Child Theme Related issue
3.CSS/JS Customization
4.Disabling Cache
5.Disabling CDN

I have also tried the performance test with a single site from the list and found the un-optimized images are one of the reasons behind your issue.
If none of the above helps, please copy your live site to a staging server so we could troubleshoot freely without breaking your live site.
And give us access in the secure note including:

– WordPress Site URL & Login URL
– WordPress Admin username/password

To create a secure note, click the key icon underneath any of your posts.

Thanks

Hi there, thanks again for the prompt response! appreciate the help.

Yes we updated theme, plugins, Wordpress everything, turned cache and CDN off, tested plugins and cleared any unneeded items on the server that could be using CPU - we found The Grid is making large long queries. I don’t believe it is related to the images, as it’s been working totally fine up until recently - and now the same pages load time can be up to 50 seconds.

I have created a staging site on a staging server and will post credentials below. Thank you!

Hi @lifehouseglobal,

In terms of loading speed, your site loads fast enough, even with The Grid present. We have tried it and it loads at 1 second to 2 seconds on average, tested and timed within the browser. Now, if you’re referring to the result from GTmetrix, then that’s a different story because it’s scoring that is based on many different factors.

For example, with or without The Grid, if you have hundreds of images on a page that isn’t optimized, it will have a low score. On this matter, we can’t cover or provide support since this isn’t related to the theme or the grid, it’s simply optimization related which should be fixed by optimization plugin, like Smush, and or selective loading plugins using Plugin Organizer.

There are many ways, but we can’t really provide support for that matter. Disabling the grid has a higher score since it also disables the images that caused it.

Thanks

Hi there,

Thanks for the response and testing that. Yes the site seems to be loading much faster now (and no I’m looking at GTmetrix).

For a period of 4 days our sites were going down, then up and then down again - sometimes taking close to a minute to load. So it may be working fine now, but we’re concerned the same issue will come up again. Our host and developer found this:

This query is being done and takes up to 50 seconds to run;

SELECT wp_28_posts.*,NOW() FROM wp_28_posts LEFT JOIN wp_28_postmeta ON ( wp_28_posts.ID = wp_28_postmeta.post_id ) LEFT JOIN wp_28_postmeta AS mt1 ON (wp_28_posts.ID = mt1.post_id AND mt1.meta_key = ‘the_grid_language’ ) WHERE 1=1 AND ( ( ( wp_28_postmeta.meta_key = ‘the_grid_language’ AND wp_28_postmeta.meta_value LIKE ‘%en%’ ) OR mt1.post_id IS NULL ) ) AND wp_28_posts.post_type = ‘the_grid’ AND ((wp_28_posts.post_status <> ‘trash’ AND wp_28_posts.post_status <> ‘auto-draft’ AND wp_28_posts.post_status <> ‘flamingo-spam’ AND wp_28_posts.post_status <> ‘tco-data’)) GROUP BY wp_28_posts.ID ORDER BY wp_28_posts.post_modified DESC;

Possibly related to this?

We’ve used the grid extensively through our sites along with WPML, so we’re concerned this kind of event could happen again. So we’re trying to get to the bottom of the issue.

Please let us know,

Hi @lifehouseglobal,

It seems The Grid can confirm that it’s not fully compatible. We can only forward it to the developer since it’s a 3rd party plugin, plus, the SQL query you’re providing is created by WP_Query based on the post type of the_grid, and any plugin can use it. If it’s really the case, then other plugins or themes that utilize post types can cause this as well.

And there is a chance that your server is intentionally throttling database requests as well. It happens that The Grid is reaching the limit. If you’re on shared hosting or hosting with limitation then that could be the cause as well.

Thanks

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.