ascari 没有内存导致 Hudson 构建失败?
有人经历过 Hudson 服务器随机崩溃吗?请参阅以下日志:
ERROR: Failed to parse POMs
java.io.IOException: Cannot run program "env": java.io.IOException: error=12, Cannot allocate memory
at java.lang.ProcessBuilder.start(ProcessBuilder.java:459)
at java.lang.Runtime.exec(Runtime.java:593)
at java.lang.Runtime.exec(Runtime.java:431)
at java.lang.Runtime.exec(Runtime.java:328)
at org.codehaus.plexus.util.cli.CommandLineUtils.getSystemEnvVars(CommandLineUtils.java:250)
at org.codehaus.plexus.util.cli.CommandLineUtils.getSystemEnvVars(CommandLineUtils.java:216)
at org.apache.maven.project.interpolation.RegexBasedModelInterpolator.<init>(RegexBasedModelInterpolator.java:63)
at sun.reflect.GeneratedConstructorAccessor120.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at java.lang.Class.newInstance0(Class.java:355)
at java.lang.Class.newInstance(Class.java:308)
at org.codehaus.plexus.component.factory.java.JavaComponentFactory.newInstance(JavaComponentFactory.java:44)
at org.codehaus.plexus.DefaultPlexusContainer.createComponentInstance(DefaultPlexusContainer.java:1464)
at org.codehaus.plexus.component.manager.AbstractComponentManager.createComponentInstance(AbstractComponentManager.java:93)
它现在安装在具有 4 GB RAM 的 32 位 Debian 5 Linux 上以及 SVN 和 Sonar,我想知道此问题的根本原因是什么?我还计划使用 SVN 和 Sonar 将其迁移到 Ubuntu 10.04 LTS 64 位,但这次我将提供 8 GB 的 RAM。
Does anyone ever experience random Hudson server crash? See the following log:
ERROR: Failed to parse POMs
java.io.IOException: Cannot run program "env": java.io.IOException: error=12, Cannot allocate memory
at java.lang.ProcessBuilder.start(ProcessBuilder.java:459)
at java.lang.Runtime.exec(Runtime.java:593)
at java.lang.Runtime.exec(Runtime.java:431)
at java.lang.Runtime.exec(Runtime.java:328)
at org.codehaus.plexus.util.cli.CommandLineUtils.getSystemEnvVars(CommandLineUtils.java:250)
at org.codehaus.plexus.util.cli.CommandLineUtils.getSystemEnvVars(CommandLineUtils.java:216)
at org.apache.maven.project.interpolation.RegexBasedModelInterpolator.<init>(RegexBasedModelInterpolator.java:63)
at sun.reflect.GeneratedConstructorAccessor120.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at java.lang.Class.newInstance0(Class.java:355)
at java.lang.Class.newInstance(Class.java:308)
at org.codehaus.plexus.component.factory.java.JavaComponentFactory.newInstance(JavaComponentFactory.java:44)
at org.codehaus.plexus.DefaultPlexusContainer.createComponentInstance(DefaultPlexusContainer.java:1464)
at org.codehaus.plexus.component.manager.AbstractComponentManager.createComponentInstance(AbstractComponentManager.java:93)
It is now installed on 32 bit Debian 5 Linux with 4 GB RAM along with SVN and Sonar, I'd like to know what would be the root cause of this problem ? I'm planning to migrate it to Ubuntu 10.04 LTS 64 bit with SVN and Sonar as well, but this time I'll give 8 GB for the RAM.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
4GB RAM 似乎足以运行 Hudson,但似乎由于进程太多而导致内存不足。
尝试增加交换分区大小。
您的交换分区通常应该是 RAM 的大小(如果不是更大的话)。
PS:现在是什么水平?
4GB of RAM seems enough to run Hudson, but it seems you are running out of memory due to too many processes.
Try increase your swap partition size.
Your swap partition should generally be the size of your RAM, if not more.
PS: What is it currently at?
我有同样的问题,我的服务器配置是:
这就是我解决问题的方法(在
root
下):I have the same problem, my server config is:
This is how I fixed the problem (under
root
):