Getting 502 Bad Gateway after attempting upgrade

AI-generated summary

A user encountered a 502 Bad Gateway error after attempting an upgrade on Discourse, resulting in the site being down. The issue was traced to Rails failing to connect to Redis and the inability to rebuild the app due to Docker rate limits (HAP429). Canapin identified the problem as a Docker hub rate limit and suggested disabling IPv6 as a solution. dudenas confirmed that disabling IPv6 resolved the issue.

Hi all,
I think I broke my site by clicking on Upgrade on “Discourse-Manager” if I recall correctly. It declared failure and I clicked on a box “reset upgrade” or sth. Cannot reproduce the actions precisely, as the site is down.

What I found out so far is that Rails does not connect to Redis, and I cannot rebuild app. Not sure how to proceed with this..

Rails production log says:
Error connecting to Redis on localhost:6379 (Errno::EADDRNOTAVAIL) subscribe failed, reconnecting in 1 second. Call stack /var/www/discourse/vendor/bundle/ruby/3.3.0/gems/redis-4.8.1/lib/redis/client.rb:398:in rescue in establish_connection’`

./launcher rebuild app:

Error response from daemon: toomanyrequests: Too Many Requests (HAP429).
Error response from daemon: toomanyrequests: Too Many Requests (HAP429).
Unable to find image 'discourse/base:2.0.20241203-0251' locally
docker: Error response from daemon: toomanyrequests: Too Many Requests (HAP429).
See 'docker run --help'.
Your Docker installation is not working correctly

You’re hitting a rate limit from Docker.

Many users were able to resolve the issue by disabling IPv6.

https://github.com/docker/hub-feedback/issues/2421

Similar issue:

Thank you, disabling ipv6 worked!