# Out of memory w/o daemon

**URL:** <https://discuss.gradle.org/t/out-of-memory-w-o-daemon/22989>\
**Category:** Help/Discuss\
**Created:** [June 16, 2017, 6:12pm UTC](https://discuss.gradle.org/t/out-of-memory-w-o-daemon/22989 "2017-06-16T18:12:18Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![sormuras](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/sormuras/32/5611_2.png) [@sormuras](https://discuss.gradle.org/u/sormuras)\
**Post date:** [June 16, 2017, 6:12pm UTC](https://discuss.gradle.org/t/out-of-memory-w-o-daemon/22989/1 "2017-06-16T18:12:18Z")

</div>

Hi!

The current JUnit 5 build at Travis runs on Gradle 4.0 and both, JDK 8 and 9. Gradle Daemon is active.

See source: [https://github.com/junit-team/junit5](https://github.com/junit-team/junit5)  
See Travis log: [https://travis-ci.org/junit-team/junit5/builds/243728556](https://travis-ci.org/junit-team/junit5/builds/243728556)  
See Build Scan(JDK9): [https://gradle.com/s/6okoeogpm3526](https://gradle.com/s/6okoeogpm3526) (memory heap size **1073 MB** )

When I switch the daemon **off** , like suggested here [https://docs.gradle.org/4.0/userguide/gradle\_daemon.html](https://docs.gradle.org/4.0/userguide/gradle_daemon.html) for CI environments, both Travis jobs fail with an out of memory error: “exit value 137”

The only change to reproduce the issue is to disable the Gradle daemon in **.travis.yml** via

```
mkdir -p ~/.gradle && echo "org.gradle.daemon=false" >> ~/.gradle/gradle.properties

```

See “no daemon” branch at: [https://github.com/junit-team/junit5/compare/gradle\_no\_daemon\_at\_travis](https://github.com/junit-team/junit5/compare/gradle_no_daemon_at_travis)  
See Travis log: [https://travis-ci.org/junit-team/junit5/builds/243645361](https://travis-ci.org/junit-team/junit5/builds/243645361)  
See Build scan (JDK 8): [https://gradle.com/s/q5xwmyyxbi4ma](https://gradle.com/s/q5xwmyyxbi4ma) (memory heap size **14070 MB** )  
See Build scan (JDK 9): [https://gradle.com/s/ofrhvmuvn4o5a](https://gradle.com/s/ofrhvmuvn4o5a) (memory heap size **15829 MB** )

When I disable the Gradle daemon on my local machine (Windows 10, JDK 8 or 9) the build works as expected. No out of memory error is produced.

Do you know a way to debug this issue in detail?

---

<div class="post-metadata">

**Author:** ![sormuras](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/sormuras/32/5611_2.png) [@sormuras](https://discuss.gradle.org/u/sormuras)\
**Post date:** [June 17, 2017, 11:35am UTC](https://discuss.gradle.org/t/out-of-memory-w-o-daemon/22989/2 "2017-06-17T11:35:22Z")

</div>

Now the spurious **oom** is back on JDK 9 with activated Gradle daemon:

See [https://travis-ci.org/junit-team/junit5/jobs/243955012](https://travis-ci.org/junit-team/junit5/jobs/243955012)  
See [https://scans.gradle.com/s/kto55ghy3hfom](https://scans.gradle.com/s/kto55ghy3hfom) (memory heap size **1073 MB** )

---

<div class="post-metadata">

**Author:** ![sormuras](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/sormuras/32/5611_2.png) [@sormuras](https://discuss.gradle.org/u/sormuras)\
**Post date:** [June 17, 2017, 11:45am UTC](https://discuss.gradle.org/t/out-of-memory-w-o-daemon/22989/3 "2017-06-17T11:45:51Z")

</div>

Related issue [https://issues.gradle.org/browse/GRADLE-1946](https://issues.gradle.org/browse/GRADLE-1946) ?
