actions/cache "Cache service responded with 503" in CI
A 503 from the cache service means the backend was momentarily unavailable. It is a server-side, transient condition: the cache step warns and continues without a cache rather than failing the build, and a re-run after the blip usually succeeds.
What this error means
The Restore or Save step warns "Cache service responded with 503" (Service Unavailable). The job proceeds with a cache miss, redownloading or rebuilding dependencies.
Warning: Failed to restore: Cache service responded with 503Common causes
A transient cache service outage or maintenance
The Actions cache backend returns 503 during a brief incident or deploy; nothing in your workflow is wrong.
Overload during a broad GitHub-side disruption
A wider platform incident can make the cache service intermittently return 503 until it recovers.
How to fix it
Re-run once the service recovers
Check the GitHub status page; if the cache service is degraded, wait for recovery and re-run. The next run restores and saves normally.
Keep the build resilient to a missing cache
- Ensure a cache miss only slows the build, never breaks it (do not set
fail-on-cache-missunless required). - Let the install step fetch from the registry when the cache is unavailable.
- Re-run after the incident clears to repopulate the cache.
- uses: actions/cache@v4
with:
path: ~/.npm
key: npm-${{ hashFiles('**/package-lock.json') }}
fail-on-cache-miss: falseHow to prevent it
- Design jobs so a cache miss degrades to a slower build, not a failure.
- Avoid
fail-on-cache-miss: trueunless a hit is truly mandatory. - Re-run transient 503s after the cache service recovers.