1

I've got Jenkins configured for running about 50 consecutive app builds, but somehow after a build or 7-10 the heap seems to get flooded, occasionally crashing my system.

The Jenkins console output would show me something like:

Starting a Gradle Daemon, 4 stopped Daemons could not be reused

And if i open the Task Manager (on Windows) i can see that Jenkins keeps starting similar 'Open JDK Platform Binary' processes (more than 15!), but can't seem to clean them up and this is what eventually causes occasionally a system crash, but most of the time the next build to not be able to succeed. Giving me a console log message like:

  • What went wrong: Unable to start the daemon process. This problem might be caused by incorrect configuration of the daemon. For example, an unrecognized jvm option is used. Please refer to the User Manual chapter on the daemon at https://docs.gradle.org/5.5/userguide/gradle_daemon.html Process command line: C:\Program Files\Android\Android Studio\jre\bin\java.exe -XX:MaxHeapSize=4g -Xmx4g -Dfile.encoding=windows-1252 -Duser.country=US -Duser.language=en -Duser.variant -cp C:\Gradle\gradle-5.5\lib\gradle-launcher-5.5.jar org.gradle.launcher.daemon.bootstrap.GradleDaemon 5.5 Please read the following process output to find out more: Error occurred during initialization of VM Unable to allocate 131072KB bitmaps for parallel garbage collection for the requested 4194304KB heap. Error: Could not create the Java Virtual Machine. Error: A fatal exception has occurred. Program will exit.

Does anyone know how to fix this?

Rik van Velzen
  • 1,977
  • 1
  • 19
  • 37

0 Answers0