本文介绍了Java内存泄漏,仅Jenkins正在运行,Jenkins .war分析显示没有什么奇怪的的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在设置Xmx2048m且permgen空间为512的mac mini上运行Jenkins,我正在运行监控"插件,它显示Jenkins使用约200M内存(在存档过程中以400的速度运行).如下所示,这个数字正在缓慢增加.

I'm currently running Jenkins on a mac mini with Xmx2048m set and a permgen space of 512, I have the 'Monitoring' plugin running and it shows Jenkins using ~200M memory (spiking at 400 during archives). This number is slowly creeping up as you can see below.

http://i.imgur.com/vTuIyTz.png

当我在Mac mini上使用"top"查看java进程时,它显示的内存约为685M.这个数字上升得更快,最终命中2048,詹金斯炸弹爆炸了.

When I look at the java process using 'top' on the mac mini it is showing the memory at about 685M. This number creeps up quicker and, eventually, hits 2048 and Jenkins bombs out.

http://i.imgur.com/TojBjhI.png

当我重新启动计算机或重新启动Jenkins时,最高"记录回落到大约270M,而Java监视器下降到大约150M.造成这些读数差异的原因是什么?

When I reboot the machine, or restart Jenkins, the 'top' recording drops back to around 270M and the java monitor drops to around 150M. What could be causing the difference in these readouts?

有没有一种方法可以确定导致内存泄漏的确切原因?我假设它是一个插件,并且由于泄漏是连续的,而不是基于每次构建"的,所以我倾向于认为这是强制轮询或类似的操作.

Is there a way to determine what exactly is causing the memory leak? I'm assuming it's a plugin and, due to the leak being continuous rather on a 'per-build' basis, I'm inclined to think it's perforce polling or something similar.

任何帮助将不胜感激.

推荐答案

您是否尝试过进行线程转储并分析正在使用内存的位置?

Have you tried to make a Thread dump and analyze where the memory is being used ?

找出问题根源的另一种方法可能是在jenkins日志中查找.

Another way to figure out what is causing the problem might be looking in jenkins logs.

如果您将Tomcat用作服务器,则可以尝试添加内存泄漏监视器,更多 此处

If you are using Tomcat as your server you could try to add monitor for memory leaks, more here

这篇关于Java内存泄漏,仅Jenkins正在运行,Jenkins .war分析显示没有什么奇怪的的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-25 08:44