问题描述
我目前正在尝试使用hudson调用maven来构建我的项目.我不断遇到备忘录错误的问题.我在所有环境变量,hudson配置和hudson项目配置中设置了xmx和xms.我将xmx设置为1500 mb,这应该足够了,因为整个项目小于1000 mb.用于构建项目的机器是一台服务器,用于存储团队的Maven回购.
I am currently trying to build my project using hudson to call maven. I keep getting the problem of out of memoery error. I set the xmx and xms in all environmental variable, hudson configuration and hudson project config. I set the xmx to 1500 mb which should be more than enough as the whole project is less than 1000mb. the machine used to build the project is a server where the maven repo for the team is stored.
有人遇到过同样的问题吗?对它如何发生有任何想法吗?
Anyone have come acrossed the same problem? Any idea of how it happen?
推荐答案
谢谢大家回答我的问题.我已经解决了这个问题,方法是进行堆转储并对其进行分析.我通过传递以下VM参数来进行堆转储:
Thank you everyone for answering my question. I have solved the problem by making a heap dump and analysing it. I make a heap dump by passing the following VM args:
-XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=E:/
.
然后,我使用 Eclipse内存分析器打开java_pidxxxxx.hprof
文件.
I then use Eclipse Memory Analyser to open the java_pidxxxxx.hprof
file.
我发现我们用来捕获异常的侦听器无法捕获异常.因此,异常情况留在了VM中,从而导致内存泄漏!
I found out that the listener we used to catch the exception cannot catch the exception. So the exception sort of stays in the VM and hence, memory leak!
再次感谢所有答案
这篇关于奇怪的Maven内存不足错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!