# Timeout while restoring cache

**URL:** <https://travis-ci.community/t/timeout-while-restoring-cache/720>\
**Category:** Windows\
**Tags:** caching\
**Created:** [November 7, 2018, 8:35am UTC](https://travis-ci.community/t/timeout-while-restoring-cache/720 "2018-11-07T08:35:51Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![nafur](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/nafur/32/378_2.png) [@nafur](https://travis-ci.community/u/nafur)\
**Post date:** [November 7, 2018, 8:35am UTC](https://travis-ci.community/t/timeout-while-restoring-cache/720/1 "2018-11-07T08:35:51Z")

</div>

I observe windows builds to time out while restoring the cache, for example [here](https://travis-ci.org/smtrat/carl-windows/jobs/451386432). The cache is a bit less than 500MB.  
At the same time, I see caching working fine within about 30s with much larger caches [here](https://travis-ci.org/smtrat/carl/jobs/451761296) on linux machines…

Is this a general problem with IO on windows? (I had the impression that they are somewhat slower in general)

---

<div class="post-metadata">

**Author:** ![nafur](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/nafur/32/378_2.png) [@nafur](https://travis-ci.community/u/nafur)\
**Post date:** [November 28, 2018, 8:13am UTC](https://travis-ci.community/t/timeout-while-restoring-cache/720/2 "2018-11-28T08:13:13Z")

</div>

Reading through several other topics, it seems that poor performance seems to be a general problem with the Windows VMs.  
Is there any hope that this will improve? Or should be try to workaround this in some way?

---

<div class="post-metadata">

**Author:** ![nafur](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/nafur/32/378_2.png) [@nafur](https://travis-ci.community/u/nafur)\
**Post date:** [March 20, 2019, 8:37am UTC](https://travis-ci.community/t/timeout-while-restoring-cache/720/3 "2019-03-20T08:37:36Z")

</div>

I checked this again and apparently the situation has not changed a lot. Not it even fails [while packing the cache](https://api.travis-ci.org/v3/job/451386431/log.txt)…  
Is there anything I can do about that? Are there any activities to improve IO performance?

---

<div class="post-metadata">

**Author:** ![wojnilowicz](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/wojnilowicz/32/4511_2.png) [@wojnilowicz](https://travis-ci.community/u/wojnilowicz)\
**Post date:** [May 2, 2019, 5:46am UTC](https://travis-ci.community/t/timeout-while-restoring-cache/720/4 "2019-05-02T05:46:39Z")

</div>

This [PR](https://github.com/travis-ci/casher/pull/41) should improve performance.

---

<div class="post-metadata">

**Author:** ![tanzislam](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/tanzislam/32/2591_2.png) [@tanzislam](https://travis-ci.community/u/tanzislam)\
**Post date:** [August 29, 2019, 2:51am UTC](https://travis-ci.community/t/timeout-while-restoring-cache/720/5 "2019-08-29T02:51:40Z")

</div>

This is likely due to Windows Defender. [This post](https://travis-ci.community/t/windows-builds-time-out-during-cache-restore/4642/4) shows how to disable it before cache download begins.

---

<div class="post-metadata">

**Author:** ![BanzaiMan](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/banzaiman/32/67_2.png) [@BanzaiMan](https://travis-ci.community/u/BanzaiMan)\
**Post date:** [September 7, 2019, 3:28am UTC](https://travis-ci.community/t/timeout-while-restoring-cache/720/6 "2019-09-07T03:28:21Z")

</div>

> [@Windows builds time out during cache restore](https://travis-ci.community/t/windows-builds-time-out-during-cache-restore/4642/7):
>
> I’ve tested @tanzislam’s idea with a fork of @bkimminich’s repo. Here’s the “happy” build: [https://staging.travis-ci.org/BanzaiMan/juice-shop/builds/747916](https://staging.travis-ci.org/BanzaiMan/juice-shop/builds/747916). Compared to the previous build [https://staging.travis-ci.org/BanzaiMan/juice-shop/builds/747914](https://staging.travis-ci.org/BanzaiMan/juice-shop/builds/747914) (which created the cache), the build time is 2 minutes shorter. With the production code with no tinkering with Windows Defender, [https://staging.travis-ci.org/BanzaiMan/juice-shop/builds/747918](https://staging.travis-ci.org/BanzaiMan/juice-shop/builds/747918) fails to expand the cache. See
