Skip to content
Latchkey

Docker registry "500 Internal Server Error" in CI

The registry returned a 5xx, meaning the failure is on the server side. These are transient blips, not a problem with your image or credentials, and usually succeed on retry.

What this error means

A pull or push fails with received unexpected HTTP status: 500 Internal Server Error (or 502/503). Re-running the same command shortly after often succeeds.

docker
error: failed to push ghcr.io/org/app:latest:
received unexpected HTTP status: 500 Internal Server Error

Common causes

Registry-side outage or load

The registry hit an internal error or was overloaded when the request landed.

Large blob upload interrupted

A big layer push can trip a server-side timeout that surfaces as a 5xx.

How to fix it

Retry with backoff

  1. Re-run the pull/push after a short wait; transient 5xx usually clears.
Terminal
for i in 1 2 3; do docker push ghcr.io/org/app:latest && break; sleep $((i*5)); done

Reduce per-request load

  1. Split very large images or push fewer tags at once.
  2. Check the registry status page for an ongoing incident.

How to prevent it

  • Wrap registry operations in a bounded retry. Self-healing managed runners such as Latchkey auto-retry transient registry 5xx blips automatically, so a momentary server error does not fail the job.

Frequently asked questions

What causes ""received unexpected HTTP status: 500""?
The registry hit an internal error or was overloaded when the request landed.
How do I fix "received unexpected HTTP status: 500"?
Retry with backoff

Related guides

References

Latchkey auto-heals failures like this one - detected, fixed, and retried without you. Start free → 30-day trial · No credit card