WAIT: Query Count Condition is not saving

Hello,

I have a problem with the query count condition query_results_count:bricksid

The Problem: When I query a Metabox Relationship and use the dynamic data tag query_results_count:bricksid in a Bricks condition the site slows down a lot. I can see that the server CPU Usage goes through the roof while trying to save that.

Can anyone try to replicate this and confirm this?

How to replicate the problem:

1. Create a CPT (e.g. FAQ)
2. Create a MB Relationship “Page <> FAQ”
3. Create an FAQ Item and assign it to a page
4. Built a FAQ Section on that page
5. Querry the FAQ with a MB Relationship Querry
6. Built a condition on the FAQ-Section {query_results_count:jgmtgt} where jgmtgt is the Bricks ID of the element on which query loop is enabled. (see screenshot)

When doing that, my CPU usage goes through the roof (im not doing anything else on that server):

When it is finally saved (takes like 5 minutes), the condition does not work correctly: The FAQ section is hidden, despite the querry count being 1.

I hope someone can confirm this and we might find the issue behind it.

Hi Philipp,
Thanks so much for your report!

Unfortunately, I cannot reproduce the issue. Would you be so kind as to send temporary login credentials and a link to this thread to help@bricksbuilder.io using the email address you used during the purchase?

Best regards,
timmse

1 Like

Hi @timmse,

I copied the server and prepared everything for you guys to easily inspect. While doing so everything worked as it was supposed to. So its clearly something with my server and not with Bricks.

This is not a bug and can be closed :heart_eyes:

Sorry for taking up your time!

1 Like

No problem,
The setup was pretty easy and quick to replicate :v:

1 Like

@philipp

Have you hosted your website at raidboxes?
The monitoring looks like it

I also have a site there and also very often a high CPU load. Especially in the backend.
I run almost 1:1 the same site as on RaidBoxes at AllInkl and everything runs much more smoothly there, although I have much less power.

I also wonder what the problem is.

1 Like

@ST90 yes its raidboxes. I also noticed that it has gone slower in the last couple of weeks. Before that everything was fine. Did you notice the same?

1 Like

@philipp

Yes, somehow, but its difficult to judge for me. It was already quite slow, but at the time my website was running with Elementor. I thought the problem was solved by switching to Bricks, but the speed has only improved slightly.

When I click through the backend, it sometimes takes 1.5 to 2.5 seconds and then the interruptions sometimes occur, where it sometimes takes5 to 15 seconds. Even large posts with many queries are really slow.

I really cant explain this. Query Monitor doesnt help much. It says something about the opcode cache (Zend OPcache) and the database queries that take a little longer come from WordPress Core. I have also deactivated server-side caching

Maybe some Nginx setting. Under Apache on All-Inkl it runs surprisingly smoothly and with LocalWP with nginx I have no problems either.

I have the Pro plan with 4 GB RAM, 2vCore and 1024 MB PHP memory limit. Actually already overpowered for my purpose.

Another thing I have noticed is that when I deactivate WooCommerce it runs much faster. I know that Woo is not lightweight but I use it in its most minimal form and it shouldnt make that much of a difference

1 Like

Which browser do you use? Firefox has known lags in Bricks, which I can confirm – the team is working on it and I hope it gets resolved, as Firefox is my browser choice (also because I get problems with automatic.css and chrome at raidboxes). But I also experience these backend lags in Chrome as well.

Yes Query Monitor tells me the same, but I did not know what to make of it. I have activated the server cache - why you deactivated it?

I have some sites with pro plan, they seem to run smoothly. Just read the mail, that the small boxes will be upgraded soon (starter from 1 cpu to 2 cpus) - looking forward to that :slight_smile: .

Yesterday I noticed somethign strange: My site was really slow, and some conditions did not work. When I saved it as a Raidboxes Template and created a new box (also starter box) with it, everything was much faster and even the condition saved. I will contact raidboxes about it and ask if thats a thing.

/Edit: I talked to Raidboxes and got help. They said OP cache is already activated on server side and dont need to be activated via a plugin - we can ignore the Query Monitor warning.

My obersvation with a faster box after copying the template could not be confirmed neither denied. Could be that database or temp memory was full of the box and copying emptied it.

1 Like

Hi @timmse,

I have to open this thread again, cause the problem occured again.
I could pinpoint it down to sites with multiple sections, hence I assume its happening when there is a more complex DOM.

I though it was solved, cause the testsetup I prepared for you, was a really simple page with just one section. Saving said condition on that simple page is quite fast.

However when it comes to more complex page, the server performance still goes through the roof.

Should I send you those login credentials? :slight_smile:

Yes, please send temporary login credentials and a link to this thread to help@bricksbuilder.io using the email address you used during the purchase :v:

Normally I am/was always a Firefox user. But since I have been using Bricks, I have switched to Chrome.
Subjectively it worked better with Chrome in the editor where I sometimes had a few bugs.

I deactivated the server-side cache because I work a lot with queries, filters and conditions, and administration to manage that was much easier with PerfMatters.

Thank you for the information. I will also contact Raidboxes. Maybe that will help with troubleshooting or they can give us tips on what we can adjust if necessary. In my case it was once the case that the conditions didn’t work and then a few hours later they did.

Yes, I saw the email too. Sounds really good, I just hope they dont increase the prices soon. But moving to a new server makes me optimistic. As soon as I know more, I will write here again

So it turns out, this is not solved. It only was solved for a short amount of time, than it came back. It is definitely connected to this bug report: https://forum.bricksbuilder.io/t/wip-builder-lags-and-massive-cpu-spikes-when-working-with-dynamic-data/

The same thing here. I have a page with some dynamic data and echo tags, and when I save the page, the server goes to 300% and goes offline. I have to rename these folders to themes_old and plugins_old for it to return to normal.