What is the cause of intermittent "Failed to store cache entry for task" failures?

We occasionally get the following:

* What went wrong:
Execution failed for task ':...:compile...Java'.
> Failed to store cache entry for task ':...:compile...Java'

Notes:

  1. Does not happen always. When re-run the problem likely disappears.
  2. Presently using Gradle 6.2.1
  3. Build cache was enabled via gradle.properties. Since disabling it I did not see it (but that does not mean I won’t).
  4. We usually run with --parallel.

What can I do to cause/avoid it? Is this a defect? Does it have a workaround or a fix in 6.2.2 or 6.3?

2 Likes

Was this resolved? I am having the same issue in Gradle 6.4.1. I get this on the CI server where multiple Gradle builds are running at the same time.