[jenkins]解決jenkins記憶體溢位問題
在jenkins master-slave配置中,總是出現記憶體溢位問題,更換了機器裝置仍然跑不起來:
問題如下:
問題解決方案:伺服器端啟動war包新增引數,/usr/bin/java -Xms1024m -Xmx1024m -XX:PermSize=512M -XX:PermSize=1024M -jar jenkins.war --httpPort=18080 --ajp13Port=18009
因為單獨在slave機器上跑沒有問題,所以slave機器可以不加,如果單獨在slave機器上單獨執行指令碼也有記憶體溢位問題,那麼slave執行指令碼也要加
詳細文件,參考:
http://bbs.scmroad.com/thread-19316-1-1.html
問題如下:
Status Code: 500
Exception: org.apache.commons.jelly.JellyTagException: jar:file:/Users/alibaba/.jenkins/war/WEB-INF/lib/jenkins-core-1.512.jar!/hudson/model/Run/console.jelly:65:27: <j:whitespace> Java heap space
Stacktrace:
javax.servlet.ServletException: org.apache.commons.jelly.JellyTagException: jar:file:/Users/alibaba/.jenkins/war/WEB-INF/lib/jenkins-core-1.512.jar!/hudson/model/Run/console.jelly:65:27: <j:whitespace> Java heap space
at org.kohsuke.stapler.jelly.JellyFacet$1.dispatch(JellyFacet.java:103)
at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:677)
at org.kohsuke.stapler.Stapler.invoke(Stapler.java:770)
at org.kohsuke.stapler.MetaClass$12.dispatch(MetaClass.java:384)
at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:677)
at org.kohsuke.stapler.Stapler.invoke(Stapler.java:770)
at org.kohsuke.stapler.MetaClass$6.doDispatch(MetaClass.java:241)
at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53)
at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:677)
at org.kohsuke.stapler.Stapler.invoke(Stapler.java:770)
at org.kohsuke.stapler.Stapler.invoke(Stapler.java:583)
at org.kohsuke.stapler.Stapler.service(Stapler.java:214)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:45)
at winstone.ServletConfiguration.execute(ServletConfiguration.java:248)
at winstone.RequestDispatcher.forward(RequestDispatcher.java:333)
at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:376)
at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:95)
at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:87)
at winstone.FilterConfiguration.execute(FilterConfiguration.java:194)
at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:366)
at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:48)
at winstone.FilterConfiguration.execute(FilterConfiguration.java:194)
at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:366)
at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84)
at hudson.security.UnwrapSecurityExceptionFilter.doFilter(UnwrapSecurityExceptionFilter.java:51)
at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
at org.acegisecurity.ui.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:124)
at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
at org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125)
at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
at org.acegisecurity.ui.rememberme.RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java:142)
at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:271)
at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
at org.acegisecurity.ui.basicauth.BasicProcessingFilter.doFilter(BasicProcessingFilter.java:174)
at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
at jenkins.security.ApiTokenFilter.doFilter(ApiTokenFilter.java:64)
at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:249)
at hudson.security.HttpSessionContextIntegrationFilter2.doFilter(HttpSessionContextIntegrationFilter2.java:67)
at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
at hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:76)
at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:164)
at winstone.FilterConfiguration.execute(FilterConfiguration.java:194)
at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:366)
at org.kohsuke.stapler.compression.CompressionFilter.doFilter(CompressionFilter.java:50)
at winstone.FilterConfiguration.execute(FilterConfiguration.java:194)
at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:366)
at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:81)
at winstone.FilterConfiguration.execute(FilterConfiguration.java:194)
at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:366)
at winstone.RequestDispatcher.forward(RequestDispatcher.java:331)
at winstone.RequestHandlerThread.processRequest(RequestHandlerThread.java:227)
at winstone.RequestHandlerThread.run(RequestHandlerThread.java:150)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:439)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at winstone.BoundedExecutorService$1.run(BoundedExecutorService.java:77)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
at java.lang.Thread.run(Thread.java:680)
Caused by: org.apache.commons.jelly.JellyTagException: jar:file:/Users/alibaba/.jenkins/war/WEB-INF/lib/jenkins-core-1.512.jar!/hudson/model/Run/console.jelly:65:27: <j:whitespace> Java heap space
at org.apache.commons.jelly.impl.TagScript.handleException(TagScript.java:745)
at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:289)
at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
at org.kohsuke.stapler.jelly.ReallyStaticTagLibrary$1.run(ReallyStaticTagLibrary.java:99)
at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:161)
at org.apache.commons.jelly.tags.core.OtherwiseTag.doTag(OtherwiseTag.java:41)
at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:269)
at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:161)
at org.apache.commons.jelly.tags.core.ChooseTag.doTag(ChooseTag.java:38)
at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:269)
at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
at org.kohsuke.stapler.jelly.CallTagLibScript$1.run(CallTagLibScript.java:98)
at org.apache.commons.jelly.tags.define.InvokeBodyTag.doTag(InvokeBodyTag.java:91)
at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:269)
at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
at org.apache.commons.jelly.tags.core.CoreTagLibrary$1.run(CoreTagLibrary.java:98)
at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
at org.apache.commons.jelly.tags.core.CoreTagLibrary$2.run(CoreTagLibrary.java:105)
at org.kohsuke.stapler.jelly.CallTagLibScript.run(CallTagLibScript.java:119)
at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
at org.kohsuke.stapler.jelly.CallTagLibScript$1.run(CallTagLibScript.java:98)
at org.apache.commons.jelly.tags.define.InvokeBodyTag.doTag(InvokeBodyTag.java:91)
at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:269)
at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
at org.kohsuke.stapler.jelly.ReallyStaticTagLibrary$1.run(ReallyStaticTagLibrary.java:99)
at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
at org.kohsuke.stapler.jelly.ReallyStaticTagLibrary$1.run(ReallyStaticTagLibrary.java:99)
at org.kohsuke.stapler.jelly.ReallyStaticTagLibrary$1.run(ReallyStaticTagLibrary.java:99)
at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
at org.kohsuke.stapler.jelly.ReallyStaticTagLibrary$1.run(ReallyStaticTagLibrary.java:99)
at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
at org.kohsuke.stapler.jelly.ReallyStaticTagLibrary$1.run(ReallyStaticTagLibrary.java:99)
at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
at org.apache.commons.jelly.tags.core.CoreTagLibrary$2.run(CoreTagLibrary.java:105)
at org.kohsuke.stapler.jelly.CallTagLibScript.run(CallTagLibScript.java:119)
at org.kohsuke.stapler.jelly.CompressTag.doTag(CompressTag.java:44)
at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:269)
at org.kohsuke.stapler.jelly.JellyViewScript.run(JellyViewScript.java:81)
at org.kohsuke.stapler.jelly.DefaultScriptInvoker.invokeScript(DefaultScriptInvoker.java:63)
at org.kohsuke.stapler.jelly.DefaultScriptInvoker.invokeScript(DefaultScriptInvoker.java:53)
at org.kohsuke.stapler.jelly.JellyFacet$1.dispatch(JellyFacet.java:95)
... 60 more
Caused by: java.lang.OutOfMemoryError: Java heap space
at java.lang.String.replace(String.java:2057)
at sun.reflect.AccessorGenerator.internalize(AccessorGenerator.java:402)
at sun.reflect.AccessorGenerator.getClassName(AccessorGenerator.java:396)
at sun.reflect.MethodAccessorGenerator.generate(MethodAccessorGenerator.java:286)
at sun.reflect.MethodAccessorGenerator.generateSerializationConstructor(MethodAccessorGenerator.java:95)
at sun.reflect.ReflectionFactory.newConstructorForSerialization(ReflectionFactory.java:313)
at java.io.ObjectStreamClass.getSerializableConstructor(ObjectStreamClass.java:1322)
at java.io.ObjectStreamClass.access$1500(ObjectStreamClass.java:50)
at java.io.ObjectStreamClass$2.run(ObjectStreamClass.java:435)
at java.security.AccessController.doPrivileged(Native Method)
at java.io.ObjectStreamClass.<init>(ObjectStreamClass.java:411)
at java.io.ObjectStreamClass.lookup(ObjectStreamClass.java:308)
at java.io.ObjectStreamClass.initNonProxy(ObjectStreamClass.java:545)
at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1599)
at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1494)
at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1599)
at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1494)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1748)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1327)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:349)
at hudson.console.AnnotatedLargeText.createAnnotator(AnnotatedLargeText.java:131)
at hudson.console.AnnotatedLargeText.writeHtmlTo(AnnotatedLargeText.java:157)
at hudson.console.AnnotatedLargeText.writeLogTo(AnnotatedLargeText.java:146)
at org.kohsuke.stapler.framework.io.LargeText.doProgressText(LargeText.java:262)
at hudson.console.AnnotatedLargeText.doProgressiveHtml(AnnotatedLargeText.java:94)
at sun.reflect.GeneratedMethodAccessor586.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:288)
at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:151)
at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:90)
at org.kohsuke.stapler.MetaClass$1.doDispatch(MetaClass.java:111)
問題解決方案:伺服器端啟動war包新增引數,/usr/bin/java -Xms1024m -Xmx1024m -XX:PermSize=512M -XX:PermSize=1024M -jar jenkins.war --httpPort=18080 --ajp13Port=18009
因為單獨在slave機器上跑沒有問題,所以slave機器可以不加,如果單獨在slave機器上單獨執行指令碼也有記憶體溢位問題,那麼slave執行指令碼也要加
詳細文件,參考:
http://bbs.scmroad.com/thread-19316-1-1.html
相關文章
- 記憶體溢位問題記憶體溢位
- 記憶體溢位的問題記憶體溢位
- 谷歌安卓5.1.1即將推送:解決記憶體溢位問題谷歌安卓記憶體溢位
- 解決記憶體溢位九法記憶體溢位
- tomcat記憶體溢位問題記錄Tomcat記憶體溢位
- 記憶體和棧溢位問題定位記憶體
- java向excel 寫入海量資料記憶體溢位問題 解決JavaExcel記憶體溢位
- jvm記憶體設定及記憶體溢位、解決方案JVM記憶體溢位
- Nuxtjs node memory 記憶體溢位問題UXJS記憶體溢位
- BufferedImage記憶體洩漏和溢位問題記憶體
- 基礎學習-記憶體溢位問題記憶體溢位
- Windows Tomcat 記憶體溢位解決方法WindowsTomcat記憶體溢位
- WEBLOGIC 記憶體溢位 解決方案(轉)Web記憶體溢位
- Java棧溢位|記憶體洩漏|記憶體溢位Java記憶體溢位
- 解決SqlServer執行指令碼,檔案過大,記憶體溢位問題SQLServer指令碼記憶體溢位
- 記憶體溢位記憶體溢位
- 記一次記憶體溢位問題的排查、分析過程及解決思路記憶體溢位
- tomcat記憶體溢位問題監控工具Tomcat記憶體溢位
- tomcat記憶體溢位:PermGen space解決方法Tomcat記憶體溢位
- Java記憶體溢位的詳細解決方案Java記憶體溢位
- Android有效解決載入大圖片時記憶體溢位的問題Android記憶體溢位
- 阿里大佬講解Java記憶體溢位示例(堆溢位、棧溢位)阿里Java記憶體溢位
- JVM面試問題系列:深入詳解JVM 記憶體區域及記憶體溢位分析JVM面試記憶體溢位
- Java記憶體溢位Java記憶體溢位
- JBOSS記憶體溢位記憶體溢位
- 揭露 FileSystem 引起的線上 JVM 記憶體溢位問題JVM記憶體溢位
- POI實現大資料EXCLE匯入匯出,解決記憶體溢位問題大資料記憶體溢位
- tomcat伺服器記憶體溢位解決方法Tomcat伺服器記憶體溢位
- java 讀 大檔案excel 記憶體溢位 解決JavaExcel記憶體溢位
- Android圖片記憶體溢位的解決方案Android記憶體溢位
- 記憶體溢位:native溢位 和 上層溢位記憶體溢位
- CSS解決文字溢位問題CSS
- 記憶體溢位和記憶體洩露記憶體溢位記憶體洩露
- 記憶體洩漏和記憶體溢位記憶體溢位
- Jenkins Git 中文亂碼問題解決JenkinsGit
- JVM執行緒和記憶體溢位問題排查思路JVM執行緒記憶體溢位
- eclipse中啟動專案報記憶體溢位問題通過修改配置解決Eclipse記憶體溢位
- WebLogic: 記憶體溢位Web記憶體溢位