Skip to content
Latchkey

GitHub Actions "Failed to restore: Cache service responded with 503"

The Actions cache service returned HTTP 503 (Service Unavailable) on a restore. This is a temporary backend outage - the cache is skipped, the job continues, and a retry typically restores normally.

What this error means

An actions/cache restore step logs "Warning: Failed to restore: Cache service responded with 503". It is a warning, not a failure, so the job proceeds with a cache miss.

Actions log
Warning: Failed to restore: Cache service responded with 503

Common causes

Transient cache backend unavailability

A brief outage or degraded window in the cache service returns 503 to restore requests until it recovers.

Restore treated as fatal

If a workflow wraps the cache step to fail on any error, a transient 503 wrongly fails the job instead of falling back to a clean install.

How to fix it

Let the job continue on a restore miss

Keep the cache step non-fatal so a 503 falls back to installing dependencies normally.

.github/workflows/ci.yml
- uses: actions/cache@v4
  id: cache
  continue-on-error: true
  with:
    path: ~/.cache/pip
    key: pip-${{ hashFiles('requirements.txt') }}
- run: pip install -r requirements.txt

Retry the transient outage

  1. Re-run the job; 503s from the cache service are short-lived.
  2. Do not gate the build on a successful cache restore.
  3. Check the GitHub status page if 503s persist across many runs.

How to prevent it

  • Treat cache restore as best-effort, never required.
  • Always keep the real install step so a miss is harmless.
  • Retry transient 503s instead of failing the job.

Frequently asked questions

What causes ""cache service 503""?
A brief outage or degraded window in the cache service returns 503 to restore requests until it recovers.
How do I fix "cache service 503"?
Keep the cache step non-fatal so a 503 falls back to installing dependencies normally.
Can Latchkey fix this automatically?
Yes. Latchkey runs your GitHub Actions on managed runners that detect this failure, apply the fix, and retry the job automatically - self-healing is on by default.

Related guides

References

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