time out error code 522 how can be fix?
Hi there,
Error 522 indicates that Cloudflare is unable to reach the origin web server and the request times out:
Troubleshooting Cloudflare 5XX errors
In this particular case, looking at our logs for your zone, this is what we get:
"_source": {
**
"count": 1,
**
**
"anycast": "enabled",
**
"severity": "ERROR",
**
**
"message": " context: Fail to connect to **:8080 cause: Connection timed out (os error 110)",
"host": "**",
"request": "GET /",
"upstream": "**:8080",
**
"status": "522",
"error": {
"source": "Upstream",
"type": "ConnectTimedout",
"context": "Fail to connect to addr: **:8080"
},
I would 1st make sure you’re using the correct SSL/TLS encryption mode as it’s currently set to Flexible
, meaning Cloudflare will send request to your origin by using unencrypted connection.
I suggest changing it to Full (strict)
. If you need an origin certificate you can generate one under SSL/TLS
> Origin Server
> Create certificate
.
This alone will increase you website security, but better yet, might solve your issue as your origin seems to be actively rejecting connections on port 80:
If this alone does not solve your issue, please make sure your origin is not applying any kind of firewall mitigation to Cloudflare IP addresses.
Cloudflare IP Ranges
Allow Cloudflare IP addresses
Take care.
This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.