Hi all, To try and benefit from build caching, ou...
# community-support
r
Hi all, To try and benefit from build caching, our CI server shares the
~/.gradle/caches/build-cache-1
between runs. Unfortunately this means periodically when two builds run concurrently one fails as so:
Copy code
> Failed to load cache entry 0801251eccdf893889c1065191e1327d for task ':admin-api:findDeclaredProcsMain': Could not load from local cache: Timeout waiting to lock Build cache (/home/worker/.gradle/caches/build-cache-1). It is currently in use by another process.
  Owner PID: 52
  Our PID: 53
  Owner Operation: 
  Our operation: 
  Lock file: /home/worker/.gradle/caches/build-cache-1/build-cache-1.lock
Looks like it's a 30 second timeout. Is this a sign that sharing that directory is a bad idea? Or that Gradle is being too aggressive with the lock (could it take and release it much more frequently during concurrent builds, I wonder)?
v
That is "local build cache", so yes, like almost everything in
GRADLE_USER_HOME
you should not share this to multiple build agents. If you want to leverage a common build cache, you should use a remote build cache.
1
🙏 1