WordPress Site Health Critical Error with Cloudflare enabled

What is the name of the domain?

visionlab.nz

What is the error message?

Page cache is detected but the server response time is still slow

What is the issue you’re encountering

WordPress site health is reporting slow server response times in site health when Cloudflare is enabled.

What steps have you taken to resolve the issue?

Disabling proxy and A records resolves the critical error in site health
This has only started happening recently and not sure if it has something to do with the free plans on Cloudflare now requiring paid plans for website optimisation like Argo?
I have LiteSpeed Servers, With approx 80 WordPress websites using Divi theme and LiteSpeed Cache plugin connected to Cloudflare with API
The sites seem to run fast and have spent years getting the settings right in Divi peformance optimiations, LiteSpeed Cache and Page Optimisations and Cloudflare to ensure the speed and optimisation on our sites without comprimising functionality.
The only issue I have now is the critical error on slow server response times in WordPress Site Health when Cloudflare proxy is enabled.
I have tried almost every fix found in support forums on Cloudflare, LiteSpeed Cache and WordPress to try and resolve this error
I have tried to add rules to Cloudflare to bypass caching for ajax.php and site-health.php but this has not resolved the critical error.
Besides this error which I belive to be a false postive in WordPress eveything else is working alright.
I have tried running site in safe mode without any plugins and themes but still get the error when checking site health with Cloudflare proxy enabled. disabling proxy removes the error.
Has anyone experienced this issue recently and overcome it? Your assistance will be appreciated.
Thank you

What are the steps to reproduce the issue?

Install wordpress website on LiteSpeed servers with Lite Speed Cache
Enable Cloudflare
Test WordPress Site Health

Screenshot of the error

I tested this on two websites who have paid for Cloudflare plans compared to the free Cloudflare plans and I am not seeing this slow server response times in WordPress site health for the paid for plans.
Do we need Cloudflare paid for plans to resolve these issues now? Have they removed some feautres from the free plan that is causing this issue in wordpress site health now?

Hositng support has confirmed:
This kind of issue occurs when a server makes requests to itself through Cloudflare, causing increased latency compared to external users.
Since Cloudflare routes all traffic through its network, these internal requests can take longer to complete.

Here are some of the things we could recommend, you may need to bypass Cloudflare for local requests. You need to modify the /etc/hosts
file to resolve the domain directly to the local server IP.
You can also set up a Cloudflare Page Rule or WAF Exception: Kindly create a Cloudflare Page Rule to bypass caching for requests coming
from the server IP. Alternatively, configure a Web Application Firewall (WAF) exception for internal requests.
Tests:

In reality the response time is not as long as indicated see results below from public users

$ curl -o /dev/null -s -w “Total: %{time_total}s\n” domain
Total: 0.316220s
$ curl -o /dev/null -s -w “Total: %{time_total}s\n” domain
Total: 0.327420s

So this is below the 600 millisecond threshold required by WordPress Site Health

But when I do the same test from the host they are all over the threshold
curl -s -o /dev/null -w “%{time_starttransfer}\n” domain
1.639
curl -s -o /dev/null -w “%{time_starttransfer}\n” domain
1.664
curl -s -o /dev/null -w “%{time_starttransfer}\n” domain
1.668
curl -o /dev/null -s -w “%{time_total}\n” -H “Cache-Control: no-cache” “domain”
1.849

Is there someway we can configure Cloudflare to not pass request from the host through its proxy so these wordpress site health checks dont report false postives about the server response time being too slow?

This topic was automatically closed after 15 days. New replies are no longer allowed.