Jenkins会OOM

本来还打算在AWS的服务器上搭个jenkins来自动化编译的。

配置都配置好了,但是跑着跑着就会报502(nginx倒是很直白)

后来才发现,服务直接被关掉了(

sudo service jenkins status

估计是内存不够(主目录已经转移到了单独的硬盘上,空间肯定够的)导致了一系列问题后挂掉了吧。毕竟是AWS的最低配的EC2(VPS) T_T

网上一查,官网没找到有最低硬件配置要求,但还真有维护人员指出了这一点

CPU : n/a (bye bye plain old school CPU at least ;) )

RAM : 1GB (I prefer 2)

HDD : depends on the needs. For my use, a 8 modules j2ee maven project + db scripts (6500 lines of code) represents less of 50 MB. I configured Jenkins to store 10 builds (500 MB)

报着也许我搞错了吧的心态(其实是死马当活马医了。。),double check了/var/log/jenkins/jenkins.log,结果:

Nov 03, 2014 7:20:21 AM org.eclipse.jetty.util.log.JavaUtilLog warn

WARNING:

java.lang.OutOfMemoryError: unable to create new native thread
        at java.lang.Thread.start0(Native Method)
        at java.lang.Thread.start(Thread.java:714)
        at java.util.concurrent.ThreadPoolExecutor.addWorker(ThreadPoolExecutor.java:949)
        at java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:1371)
        at winstone.BoundedExecutorService.scheduleNext(BoundedExecutorService.java:74)
        at winstone.BoundedExecutorService.execute(BoundedExecutorService.java:64)
        at org.eclipse.jetty.util.thread.ExecutorThreadPool.dispatch(ExecutorThreadPool.java:126)
        at org.eclipse.jetty.server.nio.SelectChannelConnector$ConnectorSelectorManager.dispatch(SelectChannelConnector.java:300)
        at org.eclipse.jetty.io.nio.SelectChannelEndPoint.dispatch(SelectChannelEndPoint.java:236)
        at org.eclipse.jetty.io.nio.SelectChannelEndPoint.schedule(SelectChannelEndPoint.java:195)
        at org.eclipse.jetty.io.nio.SelectorManager$SelectSet.doSelect(SelectorManager.java:498)
        at org.eclipse.jetty.io.nio.SelectorManager$1.run(SelectorManager.java:290)
        at winstone.BoundedExecutorService$1.run(BoundedExecutorService.java:77)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:745)

T_T

彻底死心了。。。