WordPress plugin updates getting 524, origin server response quick 200

This seems to be happening for all plugin update ajax requests for this site. Here’s how a request is logged in the browser:

Request URL: https://dermaplanepro.com/wp-admin/admin-ajax.php?_fs_blog_admin=true
Request Method: POST
Status Code: 524 
Remote Address: 172.67.71.219:443
Referrer Policy: strict-origin-when-cross-origin
cache-control: private, max-age=0, no-store, no-cache, must-revalidate, post-check=0, pre-check=0
cf-ray: 6c965873ef363107-LAX
content-type: text/html; charset=UTF-8
date: Thu, 06 Jan 2022 16:34:39 GMT
expires: Thu, 01 Jan 1970 00:00:01 GMT
referrer-policy: same-origin
server: cloudflare
set-cookie: cf_ob_info=524:6c965873ef363107:LAX; path=/; expires=Thu, 06-Jan-22 16:35:09 GMT
set-cookie: cf_use_ob=443; path=/; expires=Thu, 06-Jan-22 16:35:09 GMT
x-frame-options: SAMEORIGIN

The response time there is 16:34:39 GMT. On the origin server the request is logged at 16:32:59, 100 seconds earlier:

[06/Jan/2022:16:32:59 +0000] "POST /wp-admin/admin-ajax.php?_fs_blog_admin=true HTTP/1.1" 200 132 "https://dermaplanepro.com/wp-admin/plugins.php" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.110 Safari/537.36"

That makes it look like there’s an immediate origin server response, but Cloudflare continues to wait. This is seems to be a new problem, any recommendations for what to look at next?

Seems like the plugin took a while over Cloudflare’s default 100 seconds before the request timed out, either due to some longer PHP processing time needed at the origin host/server in installation process or the update of the plugin(s), but the PHP process continues and should continue executing even though you see it.

You could temporary enable “Pause Cloudflare for this site” or switch from proxied :orange: to :grey: (DNS-only) the A www and A dermaplanepro.com (or CNAME if using CNAME approach).
Wait for few minutes.
Repeat the process of plugin updates.
Upon successfull updates, switch back to proxied mode and set to :orange:.

Otherwise, try debugging at the origin host why the request takes so long - or if you ran multiple plugin updates at the same time, rather one by one?

The origin server responded almost instantly (132ms), that’s the confusing thing. The origin server logged the response 100 seconds before Cloudflare responded.

Before moving to Cloudflare, was your Website working over HTTPS connection?

May I ask what SSL option have you got selected under the SSL/TLS tab at Cloudflare dashboard for your domain ( Flexible, Full, Full Strict … )?

If so, kindly could you confirm and consider from below articles to make sure your WordPress website (domain) is working over HTTPS and the WordPress admin too:

Nevertheless, here is a way to re-check if you correctly setup the SSL for your domain with Cloudflare:

In case you do not have an SSL certificate, you can use Cloudflare SSL, if so, kindly make sure you follow the instructions as follows on the below article to setup an SSL certificate using Cloudflare Origin CA Certificate:

Last but not least, kindly have a look here for more information regarding correct SSL settings at the SSL/TLS tab on Cloudflare dashboard:

Maybe something blocked or restricted requests from Cloudflare - even it’s 524 timeout and not 1020 or 520, like some firewall Imunify360 or ModSecurity? Kindly re-check if Cloudflare is allowed to connect to your origin host to as follows in the below article:

Nevertheless, Cloudflare IP addresses list can be found here:

Thanks for the reply. It’s working now, but there is still a delay of less than 100 seconds before the browser gets a response, so I’m back to your first idea. I was misreading our logs and interpreting the response size as the elapsed time. I’m realizing now I need to add the elapsed time to our origin server logs, and I’m sure it was over 100 seconds in this case, probably due to slow HTTP requests in the plugin upgrade process. Thanks again and I hope this helps anyone else confused by this scenario.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.