WIP: Builder Lag: Massive CPU Spikes when working with dynamic data

Browser: Firefox Developer 124.0b6 (64bit)
OS: macOS

I experience builder lags and massive CPU Server Spikes when working on websites that contain dynamic data. This is not a one page instance, it is happening to several bricks sites that are currently under development - all are running on v.1-9-6-1.

It is happening when I save a page that contains dynamic data - when I hit save it takes around 3 to 5 Minutes. In this time the server CPU goes through the roof (800%). I cannot do anything in WordPress, cause everything is so slow. Sometimes this results in 504 Gateway Timeouts.

I tried different browsers: Chrome, Firefox, Firefox Dev. All have the same problem, though Chrome is a tiny bit faster.

I stumbled upon several threads that were marked “Solved”, but the issue is not solved yet. I met a couple of people who have similar problems.

Is this problem on the bug list and will be resolved? Is it possible to get an ETA for this, since it is affecting my work tremendously.

Thank you for your work!

9 Likes

Same problem. I’ve been using Bricks since the turn of the year and it’s incredibly slow to use. A completely blank WordPress install with Bricks installed and I face the same issue, regardless of browser (I’ve tried my Mac, and a Windows machine).

The builder loads in a second or two, that’s great. Now, for example, maybe I want to add a heading - I add the heading element, then have to wait three or four seconds for the heading to appear and for the builder to be useable again.

Doing absolutely anything in the builder takes an age and has virtually killed any enthusiasm I have for Bricks - it’s impossible to get into any kind of workflow when I have to constantly wait for a few seconds at I time for the builder to register what I am doing.

3 Likes

Also same problem here. With a couple of dynamic data the takes minutes to safe and overall the website is very slow.

Also very laggy when change name in structure.

2 Likes

Same problem here, on few sites, over the last year or so , for now, just randomly. It happened on shared hosting with blank install, but also on VPS, so server was not underpowered.
First I noticed it on a site with quite few plugins installed (ACSS, AT…), but it also happened on one where those plugins were not installed - although in this case it was still a bit faster. But I don’t think that’s it.

Well, for me was actually not saving for few minutes, if it did save, it was faster (maybe a minute? half a minute?), but sometimes it was also not saving at all and I had to restart the browser.

There is also second, maybe related bug, that was already mention and that is when you add element, you need to wait a bit for element to get added and rendered. Or you type some text into the text field, and it takes some time for text to appear on canvas.

Now, problems above may be from different source, but I figured out that on those sites saving does take more time, usually both problems occur.

Funny enough, sometimes editing works good and on some sites, there was no problems at all.

3 Likes

Hi guys,
Thanks so much for your reports!

We already have several reports with a similar problem, almost all of which are on WAIT, because we have not received any feedback to our questions or access data, so it has been impossible to get to the bottom of the problem so far.

Presumably, it will be a hoster-side problem in each of your cases, so it would be good if you could send us the following information by email to help@bricksbuilder.io:

  • a link to this thread
  • admin login credentials
  • information on where we can see the problem / how we can reproduce it (as quickly and easily as possible) - something like “sometimes it happens” doesn’t help further
  • information about the hoster: which hoster, what kind of hosting (shared, vps, …), technical specifications of your hosting plan if applicable,
  • server environment details from the Bricks system information (if there are entries within WordPress/server environment that are not green, please take care of them first)

Best regards,
timmse

1 Like

Hello Stefan,

thank you, I have send you the mail with credentials and information on how to reproduce the issue.

I had planned to copy the server, but could not reproduce the issue on a freshly copied server. I noticed that in the past: Freshly copied servers are lag-free for a small period of time, but than the lags and CPU spikes happen again. Hence I gave you the credentials to exactly the server box, where it appeared. But maybe thats an important information for your investigation.

Hi @AaronChaos , @ARAKZ & @matejmohar ,

Could you please also send us the information I asked for?

So far I have only received information from @philipp and @SurgeLabs, thanks guys!
The more information I have, the easier it is to find parallels :v:

Hey,
Sadly, I can’t provide it. I moved that website to another server, redo most pages and templates and removed some plugin, so there is no problems anymore.

1 Like

Hi Matej,
but surely you can say something about this, can’t you?

Hey,
I’ll give you all the info I can. I’m just not home today (and I’m on phone) and will do it over the weekend, when I get back.

1 Like

I literally can’t work on some sites when trying to either duplicate items or rename the in Structure panel. The lag is also apparent when adding/removing classes. Re-ordering elements works ok.

Working on Firefox Developer Edition but Chrome is no better either with the lag.

I am on a dedicated linux server (Latest Plesk panel) with a Ryzen 5 3600 6 Core with NVME disk & 64GB RAM. The server is almost empty with 6 really low traffic sites.

The front-end is really fast - no issues there and the back-end of some of the other sites not using bricks is also really fast. The server is not the issue.

I have more than needed resources dedicated to bricks sites (PHP, APACHE running as a Dedicated FPM application, PHP 83.3, PHP Max input vars 10000 - PHP Memory limit 1024M).

Also as you can see on the screenshot I am using some Bricks addons / plugins but disabling the does not fix the issue. It’s not Advanced Themer or Frames causing the issue.

I don’t know what to say - I tried everything and the only thing that improves the lag is having a really simple page with few elements.

Hold - I will clone the site and send credentials so you can test it.

I would recommend everyone making a https://jam.dev/ recording while using editor.

so mods can debug and/or replicate the issue if possible.

3 Likes

Videos are of no use to me in this case, @sinanisler , but this information is.

1 Like

@timmse I sent an email with Admin access to a clone of a site with the issue. You can freely tear it apart if needed since it is a clone of site under development.

I checked and the issue is there too. Actually there is no way not to experience the lag.

Hello,

So I checked and I had still one version of the website (on subdomain) online on the previous hosting plan. This website was infected, cleaned and updated to the 1.9.6.1 version. Also, on that hosting, under that cpanel account, there were 2 additional websites - with almost no traffic, but maybe it’s important to know.

Server is shared hosting, from some local company, and I have no idea how much CPU resource does it have, but I think it has 1Gb of ram.

Following image is from Bricks:

Here you can see RAM and CPU usage. Because hosting is not used anymore, it was mostly flat before, but it started going up after I started editing the page - I must say that I did not experience any lag. I mean, saving the page took about 5 seconds, but I think think is normal. Also, duplicating elements with many inner elements was not instant, but nothing to worry about.

In CPU usage, you will see one spike at the beginning. I think this spike was not caused by Bricks, but by executing cron tabs at once - because website was not visited for a while. After that, you can see that CPU usage went up, when I was editing, but it did never hit 100%.

image

Again, keep in mind that since the problems with bricks exploit, this website was cleaned, few plugins removed and updated.

I remembered I has written to this shared hosting support about 2 years ago (end of May, 2022) and their response was (I’ve translated this with Google Translate).

Hello,

thanks for the feedback.

The technical team has just checked the mentioned, and the review shows that server resources are being exceeded if the website is edited in several tabs at the same time, as part of the Bricks editor.
Just like you yourself mentioned.

Only when opening the mentioned editor or when opening multiple pages in this editor, it causes a lot of requests to be launched almost simultaneously, which means a lot of consumption of system resources in a short window of time. However, this consumption exceeds the capacity of the hosting package currently in use.
In such a case, we recommend editing the changes in fewer simultaneous tabs.

The review shows that the website has enough server resources available, since the consumption, as mentioned, is significantly increased only when editing within the mentioned editor or. when editing in multiple tabs. We also recommend a consultation with the developer of the mentioned proposal or editor that will be able to provide more information.

We are of course at your disposal for additional information.

I’ve checked the emails and yeah, I’ve reported this to you and it seemed to get fixed - at least 508 error part, that for me, at that time, was the most obvious when moving between breakpoints.

First email:

Second email:

Now, I’m not saying it’s same bug, but maybe it will give one more perspective to what could it be. Or maybe it will not be a help at all. :man_shrugging:

Thanks for looking into this and sorry I can not give you access to the website with that error this time.

Matej

1 Like

I had similar issues which I may have deduced caused by bricks trying some x retries and then falling back to failsafe query string, apparently.
For me it was as simple as changing my try_files directive in nginx config to include:
$is_args$args

Is there any official nginx config documentation for bricks? I remember looking for it and it didn’t exist at the time.

I may be off base but thought I’d mention because This would also potentially explain / coincide with the several reports of the issue being resolved upon moving to a new vhost.

If this solves the mystery let me know!

-Loren

Besides thinking that all my interventions result to a placebo improvement, I think I can indeed see some slight improvement after:

increasing opcache.memory_consumption to 256 from 128
switching to “run PHP as Dedicated application served by nginx” (vs Apache)
pm.max_children to 60 from 30

and adding the following NGINX custom directive:

try_files $uri $uri/ /index.php$is_args$args;

Still the following persists:

  • Duplicating an element in Structure panel - LAG followed by general lag in the builder for several seconds (about 20)

  • Adding new elements (slight lag) or classes

  • It is a dedicated (and EMPTY) server for god’s sake with more than normal resources dedicated to this small site I am building. Everything in the front-end “flies”. Everything in the backend is blazing fast.

  • It’s only within bricks that I am facing the lag. Something is off and it is not my server or for that matter my 2nd server

  • Renaming an element in structure panel = lagfest

I am really trying a lot of things from the server but it does not seem to be what is wrong - it is something in Bricks that needs a different config but what? There was no such issue prior to the last two updates I think.

2 Likes

Thanks everyone for describing your lag problems as well!

So I am testing this across browsers, and it does not get better.

For me it is especially happening in templates - so this could be related?
There was a slight improvement, when I turned off the setting “Render dynamic Data on Canvas” in the bricks settings.

However, the lag is still massive when it comes to:

  • Editing Pages with dynamic Data
  • Editing Pages with Query Loops
  • Editing Conditions
  • Duplicating Elements (often the lag is so severe, that it takes minutes to duplicate a card 6 times)
  • Renaming or Reordering Elements in the structure pane
  • Adding or Removing Classes
  • Copying Class Styles from one class to the other
  • Renaming classes

So its quite painful to work in the bricks builder at the moment, everything takes really long.

I hope Bricks can find the lag problem and fix it soon.

2 Likes

I am chiming in here as well. Having some issues now after the big security updates over the past couple of days.

It reminds of of the same issues that we used to get months ago, but that they eventually fixed. But now it seems like some of the lag issues are returning.

So far, I have noticed issues specifically with the Structure Panel… when trying to rename an element, and when trying to move an element in the structure to a different point.

There may verywell be other issues, but this is what I notice so far.

I tried using different browsers (Chrome, and FF Developer), and same thing in both. I also tried clearing the site cache, as well as the browser cache.

I see the request to email them, so I will do that as well.

1 Like

thanks for chiming in as well Doug!

@timmse could you estimate, when you have enough examples / infos to fix this? I know there is probably a lot on your plate, but the lags make working in bricks and meeting client deadlines quite hard.

5 Likes