Github action is stuck when trying to restore the cache
See original GitHub issue👋 It seems I have encountered an issue while trying to restore the cache on Github actions. (Sorry I cannot post the repo as is a private one).
Here is some of the cache setup and a screenshot of the action stuck on cache restore.
with:
path: ./vendor/bundle
key: v1-bundle-${{ runner.OS }}-${{ hashFiles('.github/workflows/main.yml') }}-gemfile-${{ hashFiles('Gemfile.lock') }}
restore-keys: |
v1-bundle-${{ runner.OS }}-${{ hashFiles('.github/workflows/main.yml') }}-gemfile-${{ hashFiles('Gemfile.lock') }}
v1-bundle-${{ runner.OS }}-${{ hashFiles('.github/workflows/main.yml') }}-
v1-bundle-${{ runner.OS }}-
As it appears in the screenshot I had to stop the action after 15mins. I can see from some data points that the cache restore usually fluctuates between 5sec - 1min and the cache size: is around 150 MB .
I hope the above are helpful. 🙏
Issue Analytics
- State:
- Created 4 years ago
- Reactions:6
- Comments:16 (6 by maintainers)
Top Results From Across the Web
Cache Stuck · Issue #658 · actions/toolkit - GitHub
All my actions are running, but are refusing to cache with the same error: Post job cleanup. Unable to reserve cache with key...
Read more >Cache hits don't occur in Github Actions workflows · Issue #451
I solved it by defining the cache-dir outside the node_modules directory. If I let the cache dir inside the node_modules , the hash...
Read more >upgrade @action/cache to 3.0.4 to fix stuck issue #573 - GitHub
Description: @action/cache 3.0.3 fixs a download stuck issue checkout https://github.com/actions/toolkit/blob/main/packages/cache/RELEASES.md#303 Related ...
Read more >Marketplace Actions Cache - GitHub
Cache artifacts like dependencies and build outputs to improve workflow execution time.
Read more >Unable to restore cache to certain locations #506 - GitHub
This action seems to unable to restore cache to certain locations. In this case, that would be paths starting with C:\ on Windows...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hey @joshmgross I can also confirm that the cache freezes on parallel jobs that pull from the same cache that a depended job has created.
Unfortunately logs do not provide enough data. On the last line it’s me cancelling the job after 11 minutes for no progression.
Interesting thing is that it does not happens always. It was quite stable for 3 weeks and started again last week. I’ve changed the
workflows/main.yml
to make a few extra checksif: steps.cache_bundler.outputs.cache-hit != 'true'
in case cache tries to be updated while there is a cache hit. I’ll post again if I have more findings. Thanks 😃@joshmgross sure! I’ve only set up GitHub Actions for one repository, and all the Ruby tasks for that repository run multiple jobs in parallel that all read from the same cache. It’s to parallelize rspec tests in CI (which, when the caching is working, is amazing and cuts the total test time down to 25% of what it was before! 👍). I’ve run into this issue on maybe ~40% of the days I’ve run these tasks over the last week or two, so timeouts and latency degradation this severe have been a major recurring issue, and not isolated to a single point in time.
I’ve shared some links and debug logs above, but let me know whatever other info would help y’all debug. Thanks! 😃