Gradle Daemon being killed in “Finalize Job” step

删除回忆录丶 提交于 2019-12-13 01:18:48

问题


I've got a "Build" pipeline that runs gradlew build on my java code and then just exports the jar as an artifact.

It is currently running on a self hosted agent as I was hoping this will help speed up the compilation.

I noticed that at the start of every run it says it is starting a new daemon as the stopped ones can't be used.

In the "Finalize job" step it says "Start cleaning up orphan processes." and then "Terminate orphan process: pid (17162) (java)". In the image below you can see that it is indeed terminating the process of the daemon.

I've tried running gradlew build on the server, and then running the CI and the CI then uses the gradle daemon. But if I have two builds running at once, the daemon will sometimes end as another is active.

Is there any way to stop the cleaning of orphan processes or keep the daemon running?

I've thought of a cron job to build something small to keep it running, but that feels like an awkward way of doing it.


回答1:


Setting process.clean to false in the variables of the release pipeline stops the "finalize job" step from killing all processes.

Setting variables in the release pipeline



来源:https://stackoverflow.com/questions/55634453/gradle-daemon-being-killed-in-finalize-job-step

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!