Time sensitive: GitHub Actions Cache rate limits (from GitHub staff)

Open
#10,347 31 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
20/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Quiet
Tech stack
github-actions, rust
Domain
ci-cd

Research direction

No source file, test, or entry point is identified. Start by reviewing the repository's GitHub Actions workflows and any cache-related tooling to determine whether this repository owns the affected behavior. Done would require a defined change that handles cache rate-limit responses using Retry-After, exponential backoff, and a retry limit.

Written by the indexing model from the issue text.

Description

To preserve the health of our services and reliably serve all GitHub Actions Cache users, the following rate limit will take effect immediately:

200 cache entry uploads per minute per repository.

If you exceed this limit, you will receive a 429 response and an error message indicating that you have exceeded the rate limit.

You should not retry your request until after the time specified in the Retry-After header has passed. If your request continues to fail due to this rate limit, implement exponential backoff between retries, and throw an error after a specific number of retries.

This limit helps prevent abuse and denial-of-service attacks and ensures that the service remains available for all users.

[!IMPORTANT]
Introduce the needed changes to your library so that the rate limit errors are retried as per the recommended schedule.

Update your actions and libs

If you are using any of the following actions or depend on any of these libraries:

Introduce the needed changes to maintain a high cache hit/miss ratio, or follow-up with the authors of those libraries on the progress of these changes.

Thrashing

It has also come to our attention that a substantial number of repositories adopting this library (or action) are exhibiting consistent cache thrashing behavior.

Cache thrashing occurs when cache entries are frequently evicted and re-created in a continuous cycle, preventing effective cache utilization. This happens when your workflow generates more cache data than can be stored within your available cache storage quota.

By default, GitHub Actions provides 10 GB of cache storage per repository. When this limit is reached, GitHub automatically evicts the least recently used cache entries to make room for new ones. If your workflows consistently produce cache data that exceeds this limit, the cache is constantly being written and evicted—resulting in thrashing.

This leads to:

  • Wasted compute time spent creating caches that are immediately evicted
  • Increased network bandwidth consumption
  • Little to no performance benefit from caching

To avoid thrashing, consider increasing your cache storage limit. For more information, see "Usage limits and eviction policy."

Dominant language
Rust
Stars
24.1k
Forks
2k
Avg merge
1d 5h
Merged PRs (30d)
365

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from uutils/coreutils

All issues in uutils/coreutils

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.