ascari 没有内存导致 Hudson 构建失败?

发布于 2024-10-01 04:15:44 字数 1634 浏览 5 评论 0原文

有人经历过 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

情话已封尘 2024-10-08 04:15:44

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?

墨小沫ゞ 2024-10-08 04:15:44

我有同样的问题,我的服务器配置是:

$ free -m
             total       used       free     shared    buffers     cached
Mem:          1036        982         53          0         13         39
-/+ buffers/cache:        929        106
Swap:         2047        833       1214

这就是我解决问题的方法(在 root 下):

echo 1 > /proc/sys/vm/overcommit_memory

I have the same problem, my server config is:

$ free -m
             total       used       free     shared    buffers     cached
Mem:          1036        982         53          0         13         39
-/+ buffers/cache:        929        106
Swap:         2047        833       1214

This is how I fixed the problem (under root):

echo 1 > /proc/sys/vm/overcommit_memory
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文