First of all, we already read all topics related to 521 errors and no one is like ours.
I will try to be short and describe our scenario.
We encountered randomly 521 errors, i said randomly because sometimes it does not work from pc, other time from the phone, and sometimes it does not on both. Also it happens to work for me but not for a friend. In the past weeks every thing was fine, but from yesterday seems that these errors are more often.
What we discovered and what we did right now:
- If we expose the website directly over an ip it works fine, that means that our services are up (we use kubernetes and add easily a loadbalancer)
- at the beginning we thought that the issue was “php-fpm” but we don’t have any issues on logs, and also our subdomain with a nodejs server seems to encounter the same issue.
- we stop “ufw” because of k8s and we don’t have any others firewalls on our servers.
- Hetzner told us that they do not block any traffic.
- we verify ingress logs and services logs, everything seems to be clean
- we restarted the entire infrastructure and the issue still goes on.
- we added cloudflare ips to ingress whitelist to skip the k8s ratelimit.
Our infrastrure works like: Kubernetes Ingress → nginx → php-fpm
Did anyone of you encountered such an issue ?