Gradle daemon fails to start


(Rob and Becca Spare) #1

Win XP Java 1.6.0_45 Gradle 1.5

gradlew tasks work fine, just can’t start a daemon from command line nor eclipse. Command line daemon debug output here: https://gist.github.com/anonymous/8d0873fa9a2db7a3f27b

Thanks for any help!


(Peter Niederwieser) #2

Looks like you don’t have enough free memory to run the Gradle daemon. With the JDK’s ‘jps’ command, you can easily check if you already have other Gradle daemons running, and can kill them if necessary.


(Rob and Becca Spare) #3

Using 1.5GB of 3.5GB. How much more does it need? When testing this from the command line, eclipse is not running.


(Peter Niederwieser) #4

2g free memory should be enough, but log says it can’t reserve enough heap size. Do you set a custom max heap size or permgen size in ‘GRADLE_OPTS’ or ‘gradle.properties’? Default max heap size for daemon is quite high (1024m), but I wouldn’t expect it to reserve everything upfront. Default permgen size is 256m and will likely be reserved upfront.


(Rob and Becca Spare) #5

Added org.gradle.jvmargs=-Xmx928m to gradle.properties and it worked even though there was plenty of RAM. Maybe this might help someone else. Thanks for your quick responses!


(Peter Niederwieser) #6

OK, so the daemon default (’-Xmx1024m’) was probably too high. java-maximum-memory-on-windows-xp offers some explanations and suggestions.