[英]Jenkins hangs between build and post-build
將Jenkins更新到版本2.156(從版本1.6)后,我們的一些構建作業在完成之后和轉移到構建后操作之前就會卡住。 作業本身在5分鍾內完成(與之前相同),然后掛起5-10分鍾再繼續。
我設法將其縮小到這個范圍:
"Executor #10 for master : executing 03_masa #4390" Id=34464 Group=main TIMED_WAITING
at java.lang.Thread.sleep(Native Method)
at hudson.util.ProcessTree$WindowsOSProcess.killSoftly(ProcessTree.java:560)
at hudson.util.ProcessTree$WindowsOSProcess.killRecursively(ProcessTree.java:520)
at hudson.util.ProcessTree$Windows.killAll(ProcessTree.java:666)
at hudson.Launcher$LocalLauncher.kill(Launcher.java:955)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:510)
at hudson.model.Run.execute(Run.java:1810)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:97)
at hudson.model.Executor.run(Executor.java:429)
可在此處找到引用的代碼(自2.141版本開始)。
我們可以做些什么嗎?
2.141在進程終止時引入了2分鍾的等待(它似乎與在構建期間創建的進程數相乘)
https://github.com/jenkinsci/jenkins/commit/d8eac92ee9a1c19bf145763589f1c152607bf3ed
不確定為什么killSoftly不起作用但你可以配置超時
在你的jenkins.xml中,你可以將它添加到/service/arguments
元素(在-jar之前),如下所示:
-DSoftKillWaitSeconds=0
執行此操作並重新啟動jenkins后,您應該能夠在/systemInfo
下找到SoftKillWaitSeconds設置
你的構建時間應該恢復正常
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.