multithreading - Hudson SCM 轮询线程在轮询时挂起

标签 multithreading svn hudson polling

我们使用 Hudson 作为我们的持续构建环境。出于某种原因,SCM 轮询的线程在一段时间后挂起。我已经对这些设置进行了很多尝试,但似乎没有任何效果。如何解决这个问题,是否有一些脚本可以检测到这种情况以便能够重新启动 hudson ?顺便提一句。重启 hudson 是我们目前解决这个问题的唯一方法。

最佳答案

这类似于 bug 5413 ,这应该从 2010 年末用 HUDSON 5977 解决( hudson 1.380+,或者现在是 Jenkins )。

你在那些帖子里有 some way to kill any thread stuck on the polling step :

very primitive (I'm too lazy to develop something better as this is not very important issue) Groovy script is bellow.
It could happened that it will kill also SCM polling which are not stuck, but we run this script automatically only once a day so it doesn't cause any troubles for us.
You can improve it e.g. by saving ids and names of SCM polling threads, check once again after some time and kill only threads which ids are on the list from previous check.


Thread.getAllStackTraces().keySet().each(){ item ->
  if( item.getName().contains("SCM polling") && 
      item.getName().contains("waiting for hudson.remoting")){ 
     println "Interrupting thread " + item.getId() item.interrupt() 
  }
}

关于multithreading - Hudson SCM 轮询线程在轮询时挂起,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5754968/

相关文章:

windows - 为什么 Hudson 不将 xcopy 识别为命令?

linux - Jenkins 通过分支 View 构建历史

python - 从Pool.async_map返回第一个非零结果

c# - 防止 Windows 服务中定时器的 Elapsed 事件在一个周期完成之前触发的最佳方法

svn - 结合SVN FTP系统?

svn - 如何在 TortoiseSVN 中移动我的存储库?

svn - 我使用 git-svn 导入到 git 中的 svn 存储库已经移动

c++ - 如何避免在派生类中提前销毁?

c# - 如何存储在线程池中运行的任务的结果?

Maven + hudson + Nexus : Access to SNAPSHOT Build Number