Multiple Gradle processes from same wrapper

I have set GRADLE_OPTS=-Dorg.gradle.daemon=true and am using the Gradle wrapper (2.7). Why do I see Starting a new Gradle Daemon for this build (subsequent builds will be faster). more than once? I have had as many as three Gradle processes running although I have been running Gradle from only one terminal window and never in background.

I’d expect they are different in some way (JDK, JVM arguments, GRADLE_HOME, etc). You might try inspecting the processes to confirm this is the case. For example:

47536 s001  S      0:08.63 /Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents/Home/bin/java -XX:MaxPermSize=256m -XX:+HeapDumpOnOutOfMemoryError -Xmx1024m -Dfile.encoding=UTF-8 -Duser.country=US -Duser.language=en -Duser.variant -cp /Users/mark/Downloads/gradle-2.7/lib/gradle-launcher-2.7.jar org.gradle.launcher.daemon.bootstrap.GradleDaemon 2.7
47552 s001  S      0:02.83 /Library/Java/JavaVirtualMachines/jdk1.7.0_80.jdk/Contents/Home/bin/java -XX:MaxPermSize=256m -XX:+HeapDumpOnOutOfMemoryError -Xmx1024m -Dfile.encoding=UTF-8 -Duser.country=US -Duser.language=en -Duser.variant -cp /Users/mark/Downloads/gradle-2.7/lib/gradle-launcher-2.7.jar org.gradle.launcher.daemon.bootstrap.GradleDaemon 2.7

If you find that this is not the case then running concurrent builds would be another explanation.

Yes, that’s it. Thank you.