WP Sitehealth, cURL error 28

I’ve been doing a lot of searching, but can’t seem to figure out how to solve this. Is it trellis related?

Under the relatively new “Site Health” area in Wordpress, I keep getting two errors, which I assume are related:

The REST API request failed due to an error.
Error: [] cURL error 28: Operation timed out after 30002 milliseconds with 0 bytes received

The loopback request to your site failed, this means features relying on them are not currently working as expected.
Error: [] cURL error 28: Operation timed out after 30001 milliseconds with 0 bytes received

Can anyone point me in the right direction? I’m also using CloudFlare.

Turns out my issues with Site Health were caused by using PHP sessions. All I needed to so was use the ‘read_and_close’ option like so:

session_start(['read_and_close' => true]);

much thanks to this thread:

3 Likes

Interesting - I just did a fresh Trellis install today and didn’t notice this in the site health area :thinking:

Thank you for sharing the solution

You won’t have an issue with a fresh install. It’s only when your theme or plugin is using open PHP sessions … sessions that don’t explicitly call session_write_close(). Not that I worry about WP site health, but I thought if it’s broken here, it might be broken somewhere else. Something to watch out for.

2 Likes

Another thing I just discovered: It’s possible to both add and remove tests for WP Site Health:

2 Likes

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