Wordpress an 522 Errors

Hello,

I have many 522 errors on my sweetaf.store site which uses wordpress. I have done a lot of testing and tried several solutions found in the Cloudflare community.

My host provider has also done several tests, here is their summary:

"To summarize :
https://support.cloudflare.com/hc/en-us/articles/115003011431-Troubleshooting-Cloudflare-5XX-errors
CloudFlare indicates that the 522 errors are related to a communication fault (no response) from the origin, or loss of packets along the way.

Error 522 occurs when Cloudflare times out contacting the origin web server. Two different timeouts cause HTTP error 522 depending on when they occur between Cloudflare and the origin web server:
Before a connection is established, the origin web server does not return a SYN+ACK to Cloudflare within 15 seconds of Cloudflare sending a SYN.
After a connection is established, the origin web server doesn’t acknowledge (ACK) Cloudflare’s resource request within 90 seconds.

The following causes have been ruled out or are under investigation:
- (Most common cause) Cloudflare IP addresses are rate limited
==> ok (whitelist)
- or blocked in .htaccess, iptables, or firewalls.
==> OK
- Confirm your hosting provider allows Cloudflare IP addresses
==> OK
- An overloaded or offline origin web server drops incoming requests.
==> OK
- Keepalives are disabled at the origin web server.
==> OK
- The origin IP address in your Cloudflare DNS app does not match the IP address currently provisioned to your origin web server by your hosting provider.
==> OK
- Packets were dropped at your origin web server.
==> OK

Also:
We performed several rounds of tests at various times of the day.
Command used:
time wget -nv -p -H --delete-after https://sweetaf.store
All tests performed via CloudFlares failed on 6 files (error 522).
All tests performed by bypassing cloudFlare (modification of the hosts file) are error free.
The problem seems to be concentrated around just a few files:

  1. https://sweetaf.store/wp-content/plugins/woocommerce-gateway-stripe/assets/js/stripe-payment-request.min.js?ver=4.6.0;
  2. There are also errors while retrieving images contained in https://sweetaf.store/wp-content/uploads/2020/12/.

The problem seems to be with the associated with jquery, rather than the images.
->jquery.zoom.min.js
->jquery.min.js
->single-product.min.js

As seen previously, the error 522 would be related to a lack of return. If there is a package drop, I wonder about the very systematic side of errors."

1 Like

Hi @iamartwo, thank you for a very thorough post. Is it a 512 or a 521 that you found on the 6 files? I’ve not seen a 512 before, there are some mentions on this site but the posts appear to be about 521 errors. The last quick fix idea in this tip may apply, Community Tip - Fixing Error 522: Connection timed out, although that’d be the first time I’ve actually see that situation.

It’s the answer of my Host Provider but I think it could be a typo… I guess he wanted to say 522 but I asked him and I’m waiting for his answer

EDIT: It was a typo. He wanted to say 522 @cloonan

1 Like

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