sccache-action: Tons of rate limit errors / sccache-actions can be slow because of github storage
I found that my action’s cache hit rate is too low (especially for c/c++). I enable debug log and saw tons of rate limits. How to solve this?
data close failed: RateLimited (temporary) at Writer::close => {"$id":"1","innerException":null,"message":"Request was blocked due to exceeding usage of resource 'Count' in namespace ''.","typeName":"Microsoft.TeamFoundation.Framework.Server.RequestBlockedException, Microsoft.TeamFoundation.Framework.Server","typeKey":"RequestBlockedException","errorCode":0,"eventId":3000}
About this issue
- Original URL
- State: open
- Created 3 years ago
- Reactions: 1
- Comments: 18
Commits related to this issue
- Increase sccache hit rate See Mozilla-Actions/sccache-action#50 — committed to LSPosed/Metagisk by yujincheng08 3 years ago
- switch sccache caching method and switch to Ninja so it works the official sccache action apparently sucks https://github.com/Mozilla-Actions/sccache-action/issues/50#ref-pullrequest-1747649536 — committed to OpenStarbound/OpenStarbound by Novaenia 3 years ago
https://github.com/topjohnwu/Magisk/pull/7052 seems a nice idea! We can add this feature in
sccache-actiontoo:Probably
@sylvestre here’s a toy I made on a fork of this action. https://github.com/0o-de-lally/sccache-action/tree/local It sets an input “local” which defaults to true in my version.
It will just cache the contents into a bundle called “sccache”. It’s minimalist, there are no key options. It will instead delete the cache every time and overwrite it (github doesn’t allow just updating a cache).
This suits my needs.
Anyone else that wants to try it it’s a zero config:
cc. @mwestphal
In order to work around this, I had to implement my own sccache logic and not rely on this action, here it is if it helps anyone:
runner.osAND the date. If the cache for today has not been created, it will grab the cache from yesterday thanks to therestore-keylogic. A single cache file is used, not hundreds.A 2h C++ build now takes less than 1 hour.
Hth,
See it live here: https://github.com/f3d-app/f3d-superbuild/blob/main/.github/actions/f3d-superbuild/action.yml
See https://github.com/mozilla/sccache/pull/1818 & https://github.com/orgs/community/discussions/55049
Ok. Then I will use sccache locally and then upload to GitHub action cache like I previously did.