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.
Warning: Failed to restore: Cache service responded with 503Common 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.
- uses: actions/cache@v4
id: cache
continue-on-error: true
with:
path: ~/.cache/pip
key: pip-${{ hashFiles('requirements.txt') }}
- run: pip install -r requirements.txtRetry the transient outage
- Re-run the job; 503s from the cache service are short-lived.
- Do not gate the build on a successful cache restore.
- 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.