wp-media / wp-rocket

Performance optimization plugin for WordPress
https://wp-rocket.me
GNU General Public License v2.0
690 stars 215 forks source link

High CPU usage related to rocket_saas_warmup async process #4072

Closed Tabrisrp closed 2 years ago

Tabrisrp commented 3 years ago

Describe the bug We’re getting some reports about high CPU usage with RUCSS enabled, notably on Kinsta/WP Engine, and both pointing to the asynchonous process of the resource fetcher.

As a reminder, this process is triggered asynchronously on rocket_buffer, so running on uncached pages during the caching process. the AJAX action is rocket_saas_warmup

From their logs, some of those calls are running for too long, up to 6 min.

Looking at the code, during this call, we are:

I’m thinking this specific part should be delegated to the background processing task instead, as it can be running for longer in the background, and it has time and memory limit control.

We can investigate how to move get_url_details() from this class to the background processing class.

Expected behavior No high CPU usage during this process

Screenshots

image003

Backlog Grooming (for WP Media dev team use only)

DahmaniAdame commented 2 years ago

Likely related - https://secure.helpscout.net/conversation/1755298266/318968

NataliaDrause commented 2 years ago

Related: https://secure.helpscout.net/conversation/1767312069/321368/

DahmaniAdame commented 2 years ago

Likely related - https://secure.helpscout.net/conversation/1768504551/321902/

vmanthos commented 2 years ago

Likely related: https://secure.helpscout.net/conversation/1765543580/320956/

NielsVornholt commented 2 years ago

Any progress with this issue yet or any estimation on when this will be improved/solved? We also suffer big time from this. rocket_rucss_warmup_resource_fetcher constantly destroys our production stacks due to 100% CPU consumption. In combination with rocket_saas_warmup it hits even worse. Very annoying.

image

Cloud hosting at IONOS, WP in Docker Swarm Services, Mysql on a 3-node galera cluster in full LB mode, varnish proxy cache. Site 1: 10k+ Articles Site 2: 30k+ Articles Site 3: 11k+ Articles Site 4: 12k+ Articles

vmanthos commented 2 years ago

Related ticket: https://secure.helpscout.net/conversation/1781707430/324918/

This was on WPX.

NataliaDrause commented 2 years ago

related: https://secure.helpscout.net/conversation/1780007440/324554?folderId=3864740

camilamadronero-zz commented 2 years ago

related https://secure.helpscout.net/conversation/1788668773/326426/

juricazuanovic commented 2 years ago

Related: https://secure.helpscout.net/conversation/1792673456/327207/

vmanthos commented 2 years ago

Likely related: https://secure.helpscout.net/conversation/1796149391/327887/ On WP Engine.

viobru commented 2 years ago

Likely related: https://secure.helpscout.net/conversation/1796560717/327987/

camilamadronero-zz commented 2 years ago

Related https://secure.helpscout.net/conversation/1798378864/328308/

mifrero commented 2 years ago

Related https://secure.helpscout.net/conversation/1807529841/329952/

vmanthos commented 2 years ago

Related: https://secure.helpscout.net/conversation/1797538548/328191/

AlexMnrs commented 2 years ago

Same problem here.

Hosting - Alojared

juricazuanovic commented 2 years ago

Related: https://secure.helpscout.net/conversation/1838506637/335960/

piotrbak commented 2 years ago

Closed with 3.11, we're not using the warmup anymore.