question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add configurable timeout to cache upload

See original GitHub issue

Over in the CodeQL team, we’ve recently started using the Actions cache (via the toolkit) in a scenario where we care only fairly minimally about the upload/download succeeding (it’s entirely optional) but we really care about returning quickly. In the cache downloading options, we found the segmentTimeoutInMs field (here) which serves our use case well since we can set this to a small number to make sure we return quickly (our caches are small so they always fit in one segment).

However, there is no such option in the uploading options. Is there any chance you would be able to support this? We’ve considered some hacky workarounds like spawning a new process to do the upload, but it would really be much more robust if we could configure a timeout there in the same way we can do for the download.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
bishal-pdMSFTcommented, Oct 16, 2022

I will move this issue to actions/cache repo which is a more active target for monitoring by cache team.

0reactions
edoardopirovanocommented, Nov 28, 2022

We have certainly seen downloads hang without the segmentTimeoutInMs option specified (e.g. here). Even with that option specified, in fact, we sometimes get hangs before the actual download starts (e.g. here we observed a 15 minute hang before the download started, presumably on the API call that looks for where to get the cache from).

We have not actually observed uploads failing nor hanging, but would still like to defend against this possibility so that a potential future outage in your service doesn’t cause a knock-on one for us.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Set timeouts for cache operations requests - gitlab-runner
We should configure additional timeouts for cache operations requests. Currently we use http.DefaultClient with its default timeouts.
Read more >
Setting the cache timeout | CDP Public Cloud
Setting the cache timeout · In the Cloudera Manager Admin Console, select Clusters > Hue > Configuration to navigate to the configuration page...
Read more >
Advanced content caching settings on Mac - Apple Support
Key Description Default value AllowImports Allows import (upload) requests. Yes MetricsInterval 60 (seconds) Parents none
Read more >
A Guide to Caching with NGINX and NGINX Plus
Caching, even at the reverse proxy/load balancer level, ... With this sample configuration, if NGINX receives an error , timeout , or any...
Read more >
Managing how long content stays in the cache (expiration)
Control how long files stay in the CloudFront cache and in browser ... you can configure your origin to add a Cache-Control header...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found