No memory left on ascari causes Hudson build failed?
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.newI开发者_运维问答nstance(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.
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?
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
精彩评论