Skip Navigation

[Resolved] Blocks causing high CPU Load and other issues

This support ticket is created 3 years, 11 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.

This topic contains 1 reply, has 1 voice.

Last updated by DaveR6137 3 years, 11 months ago.

Author
Posts
#1891067
Screenshot (118).png

I've been trying to convert my site from using Layouts to using Blocks as there are a number of features in Blocks that i need - and initially this was a success. I created templates for my different cpt on some other websites running on the same multisite as this site as well as as similar a setup as possible (same child theme and plugins - with a few extra on the primary site - Buddypress and bbPress in the main)

However, over the last few days - I've found the process of creating these templates on Mud and Routes to be a 'painful' process as they were often failing to save, and often losing data in between these saves. I was getting issues such as invalid JSON errors. However, i was able to progress slowly.

Tonight - on creating the final cpt template - the issue has become impossible. I was able to perhaps do a single edit on a page, and then it may or may not save. The whole site would become unresponsive until i closed that template editor page - at which point the pages would load again.

I noticed that the CPU load on my server (a decent hosting package 8GB and currently my traffic is low in comparison to peak times in August) was stuck on 100%. I tried disabling all plugins that i could - this is a live site and income is important - and found the only effect was when i disabled blocks plugin on the Main Domain (it is still running on 7 or 8 sub-sites on the same install, which have roughly 20-30% of the traffic level of main site). So i tried repeating this step (including deactivating all toolset plugins and re-activating) - and when it was deactivated - CPU went down to 10-20% usage, and up to 90-100% when activated.

I've included one screenshot from now which shows some of the json issues in the console - I suggest you take a look at these templates that I've created for my post types directly.

I've also tried to change about every setting as well - no luck!

Any idea what could be causing this?

Just some extra info that may help this. I've inserted a fair bit of code from my old layouts into these templates which includes a few that include a number of conditionals. Nothing I'd consider complex - just if a custom field is empty, then populate it from alternative post.

The front end site still runs perfectly fast as I've a pretty speedy page cacheing plugin active - which is basically what's keeping the site running.

#1891627

Just a heads up that I've solved the issue.

It was indirectly caused by Blocks - but not a bug or an issue with the plugin.

It seems that the settings Browser history management - create a load of ugly urls such as:
/five-things-outdoor-grub-how-to-articles/?wpv_view_count=99841-TCPID21659&wpv_paged=26

This in turn was being crawled by bots - with over 30,000 visits in the last 12 hours by one bot.

This explains why the task was becoming progressively harder as it went along - as the initial sites only had around 100 pages in total - while my main site has somewhere approaching 30k posts - each of which would have been contributing to the issue in some way.

I'd put many of the 'related post' views to paginate automatically - with some of these views having around 900 pages to them - so that single post would increase load by 900x.

Posting the explanation in hope that it may help someone else.