From 66adbdfd9743cccec5f7ca4992cf3a631bb22774 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 10 Aug 2016 16:06:33 +0200 Subject: HttpBinaryCacheStore: Retry on transient HTTP errors This makes us more robust against 500 errors from CloudFront or S3 (assuming the 500 error isn't cached by CloudFront...). --- src/libstore/http-binary-cache-store.cc | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/libstore/http-binary-cache-store.cc') diff --git a/src/libstore/http-binary-cache-store.cc b/src/libstore/http-binary-cache-store.cc index da80b636c7..42e9099b8e 100644 --- a/src/libstore/http-binary-cache-store.cc +++ b/src/libstore/http-binary-cache-store.cc @@ -58,6 +58,7 @@ protected: DownloadOptions options; options.showProgress = DownloadOptions::no; options.head = true; + options.tries = 5; downloader->download(cacheUri + "/" + path, options); return true; } catch (DownloadError & e) { @@ -79,6 +80,7 @@ protected: auto downloader(downloaders.get()); DownloadOptions options; options.showProgress = DownloadOptions::no; + options.tries = 3; try { return downloader->download(cacheUri + "/" + path, options).data; } catch (DownloadError & e) { -- cgit 1.4.1