# 'Could not open buildscript class cache' in parallel builds

**URL:** <https://discuss.gradle.org/t/could-not-open-buildscript-class-cache-in-parallel-builds/1430>\
**Category:** Old Forum Archive\
**Created:** [May 23, 2013, 1:03pm UTC](https://discuss.gradle.org/t/could-not-open-buildscript-class-cache-in-parallel-builds/1430 "2013-05-23T13:03:00Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ric\_Klaren1](https://avatars.discourse-cdn.com/v4/letter/r/ea5d25/32.png) [@Ric\_Klaren1](https://discuss.gradle.org/u/Ric_Klaren1)\
**Post date:** [May 23, 2013, 1:03pm UTC](https://discuss.gradle.org/t/could-not-open-buildscript-class-cache-in-parallel-builds/1430/1 "2013-05-23T13:03:00Z")

</div>

Hi,

We regularly have issues in our CI when a long running integration test runs in parallel with a smaller job on the same slave. It seems the long running job keeps a lock on something in the gradle cache.

We apply a script from a URL in one of our init scripts. Resulting in the error as seen in this [gist](https://gist.github.com/rklaren/a97d39724a3c8af06937).

The offending snippet is a straightforward ‘allprojects { apply from: ‘[http://the.url.com/stuff.gradle](http://the.url.com/stuff.gradle)’ }’.

The environment is gradle 1.4 on Linux (ubuntu 12 LTS) although I’ve seen it on Mac OS as well.

In the past I’ve worked around similar issues by relocating the gradle cache but it seems the command line option for that has gone away?

Cheers,

Ric

---

<div class="post-metadata">

**Author:** ![swpalmer](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/swpalmer/32/80_2.png) [@swpalmer](https://discuss.gradle.org/u/swpalmer)\
**Post date:** [November 16, 2013, 2:17am UTC](https://discuss.gradle.org/t/could-not-open-buildscript-class-cache-in-parallel-builds/1430/2 "2013-11-16T02:17:00Z")

</div>

I’m getting this problem with Gradle 1.9-rc-3 (and rc-2)

- Where: Script ‘F:\dev\BuildScripts\MyMasterPlugin.gradle’ line: 18

- What went wrong: A problem occurred evaluating script. \> Could not open buildscript class cache for script ‘F:\dev\BuildScripts\MyLoggingPlugin.gradle’ (C:\Users\scott.gradle\caches\1.9-rc-3\scripts\MyLoggingPlugin\_6mqkjr1dm8ldv061klekqj18ro\DefaultScript\buildscript).

> Timeout waiting to lock buildscript class cache for script ‘F:\dev\BuildScripts\MyLoggingPlugin.gradle’ (C:\Users\scott.gradle\caches\1.9-rc-3\scripts\MyLoggingPlugin\_6mqkjr1dm8ldv061klekqj18ro\DefaultScript\buildscript). It is currently in use by another Gradle instance.

Owner PID: unknown

Our PID: 2672

Owner Operation: unknown

Our operation:

Lock file: C:\Users\scott.gradle\caches\1.9-rc-3\scripts\MyLoggingPlugin\_6mqkjr1dm8ldv061klekqj18ro\DefaultScript\buildscript\cache.properties.lock

(having trouble getting this formatted correctly on this forum)

---

<div class="post-metadata">

**Author:** ![luke\_daley](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/luke_daley/32/9890_2.png) [@luke\_daley](https://discuss.gradle.org/u/luke_daley)\
**Post date:** [November 19, 2013, 2:48pm UTC](https://discuss.gradle.org/t/could-not-open-buildscript-class-cache-in-parallel-builds/1430/3 "2013-11-19T14:48:00Z")

</div>

Can you please verify with 1.9 final, and if you are still having the issue provide some more detail. Particularly about the project setup and OS.
