Is there a configuration to change the Timeouts of DefaultFileLockManager?

In our scenario with several bamboo build agents running in parallel we hit the LockTimeoutExecption very often. By looking into the gradle source code one can see that there is a constructor with a timeoutMs parameter but it seems that this constructor is never used besides the call where the default value is used.
Is there a possibility to set a longer timeout so that the parallel agents simply wait for the lock instead of throwing exceptions?

Or are there other solutions for running several build agents in parallel on a machine using the same gradle cache (setting up a private cache for each agent would result wasting huge disk space by duplicating the cache several times.

1 Like

Did you eventually figure this out? I’m having pretty much the same problem, I’m trying to share the maven cache (it’s a huge waste of space and a major slowdown on our builds if I don’t) while running the build with docker (under Jenkins 2.0).

Unfortunetaly we haven’t found a solution. We are hoping that Gradle 4.0 will bring some improvements but haven’t tested the nighly builds due to capacity reasons.