jenkins解决jenkins内存溢出问题

在jenkins master-slave配置中,总是出现内存溢出问题,更换了机器设备仍然跑不起来:
问题如下:

  1. Status Code: 500
  2. 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
  3. Stacktrace:
  4. 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
  5. at org.kohsuke.stapler.jelly.JellyFacet$1.dispatch(JellyFacet.java:103)
  6. at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:677)
  7. at org.kohsuke.stapler.Stapler.invoke(Stapler.java:770)
  8. at org.kohsuke.stapler.MetaClass$12.dispatch(MetaClass.java:384)
  9. at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:677)
  10. at org.kohsuke.stapler.Stapler.invoke(Stapler.java:770)
  11. at org.kohsuke.stapler.MetaClass$6.doDispatch(MetaClass.java:241)
  12. at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53)
  13. at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:677)
  14. at org.kohsuke.stapler.Stapler.invoke(Stapler.java:770)
  15. at org.kohsuke.stapler.Stapler.invoke(Stapler.java:583)
  16. at org.kohsuke.stapler.Stapler.service(Stapler.java:214)
  17. at javax.servlet.http.HttpServlet.service(HttpServlet.java:45)
  18. at winstone.ServletConfiguration.execute(ServletConfiguration.java:248)
  19. at winstone.RequestDispatcher.forward(RequestDispatcher.java:333)
  20. at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:376)
  21. at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:95)
  22. at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:87)
  23. at winstone.FilterConfiguration.execute(FilterConfiguration.java:194)
  24. at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:366)
  25. at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:48)
  26. at winstone.FilterConfiguration.execute(FilterConfiguration.java:194)
  27. at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:366)
  28. at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84)
  29. at hudson.security.UnwrapSecurityExceptionFilter.doFilter(UnwrapSecurityExceptionFilter.java:51)
  30. at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
  31. at org.acegisecurity.ui.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:124)
  32. at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
  33. at org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125)
  34. at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
  35. at org.acegisecurity.ui.rememberme.RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java:142)
  36. at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
  37. at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:271)
  38. at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
  39. at org.acegisecurity.ui.basicauth.BasicProcessingFilter.doFilter(BasicProcessingFilter.java:174)
  40. at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
  41. at jenkins.security.ApiTokenFilter.doFilter(ApiTokenFilter.java:64)
  42. at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
  43. at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:249)
  44. at hudson.security.HttpSessionContextIntegrationFilter2.doFilter(HttpSessionContextIntegrationFilter2.java:67)
  45. at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
  46. at hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:76)
  47. at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:164)
  48. at winstone.FilterConfiguration.execute(FilterConfiguration.java:194)
  49. at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:366)
  50. at org.kohsuke.stapler.compression.CompressionFilter.doFilter(CompressionFilter.java:50)
  51. at winstone.FilterConfiguration.execute(FilterConfiguration.java:194)
  52. at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:366)
  53. at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:81)
  54. at winstone.FilterConfiguration.execute(FilterConfiguration.java:194)
  55. at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:366)
  56. at winstone.RequestDispatcher.forward(RequestDispatcher.java:331)
  57. at winstone.RequestHandlerThread.processRequest(RequestHandlerThread.java:227)
  58. at winstone.RequestHandlerThread.run(RequestHandlerThread.java:150)
  59. at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:439)
  60. at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
  61. at java.util.concurrent.FutureTask.run(FutureTask.java:138)
  62. at winstone.BoundedExecutorService$1.run(BoundedExecutorService.java:77)
  63. at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
  64. at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
  65. at java.lang.Thread.run(Thread.java:680)
  66. 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
  67. at org.apache.commons.jelly.impl.TagScript.handleException(TagScript.java:745)
  68. at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:289)
  69. at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
  70. at org.kohsuke.stapler.jelly.ReallyStaticTagLibrary$1.run(ReallyStaticTagLibrary.java:99)
  71. at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:161)
  72. at org.apache.commons.jelly.tags.core.OtherwiseTag.doTag(OtherwiseTag.java:41)
  73. at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:269)
  74. at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
  75. at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:161)
  76. at org.apache.commons.jelly.tags.core.ChooseTag.doTag(ChooseTag.java:38)
  77. at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:269)
  78. at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
  79. at org.kohsuke.stapler.jelly.CallTagLibScript$1.run(CallTagLibScript.java:98)
  80. at org.apache.commons.jelly.tags.define.InvokeBodyTag.doTag(InvokeBodyTag.java:91)
  81. at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:269)
  82. at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
  83. at org.apache.commons.jelly.tags.core.CoreTagLibrary$1.run(CoreTagLibrary.java:98)
  84. at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
  85. at org.apache.commons.jelly.tags.core.CoreTagLibrary$2.run(CoreTagLibrary.java:105)
  86. at org.kohsuke.stapler.jelly.CallTagLibScript.run(CallTagLibScript.java:119)
  87. at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
  88. at org.kohsuke.stapler.jelly.CallTagLibScript$1.run(CallTagLibScript.java:98)
  89. at org.apache.commons.jelly.tags.define.InvokeBodyTag.doTag(InvokeBodyTag.java:91)
  90. at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:269)
  91. at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
  92. at org.kohsuke.stapler.jelly.ReallyStaticTagLibrary$1.run(ReallyStaticTagLibrary.java:99)
  93. at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
  94. at org.kohsuke.stapler.jelly.ReallyStaticTagLibrary$1.run(ReallyStaticTagLibrary.java:99)
  95. at org.kohsuke.stapler.jelly.ReallyStaticTagLibrary$1.run(ReallyStaticTagLibrary.java:99)
  96. at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
  97. at org.kohsuke.stapler.jelly.ReallyStaticTagLibrary$1.run(ReallyStaticTagLibrary.java:99)
  98. at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
  99. at org.kohsuke.stapler.jelly.ReallyStaticTagLibrary$1.run(ReallyStaticTagLibrary.java:99)
  100. at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
  101. at org.apache.commons.jelly.tags.core.CoreTagLibrary$2.run(CoreTagLibrary.java:105)
  102. at org.kohsuke.stapler.jelly.CallTagLibScript.run(CallTagLibScript.java:119)
  103. at org.kohsuke.stapler.jelly.CompressTag.doTag(CompressTag.java:44)
  104. at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:269)
  105. at org.kohsuke.stapler.jelly.JellyViewScript.run(JellyViewScript.java:81)
  106. at org.kohsuke.stapler.jelly.DefaultScriptInvoker.invokeScript(DefaultScriptInvoker.java:63)
  107. at org.kohsuke.stapler.jelly.DefaultScriptInvoker.invokeScript(DefaultScriptInvoker.java:53)
  108. at org.kohsuke.stapler.jelly.JellyFacet$1.dispatch(JellyFacet.java:95)
  109. ... 60 more
  110. Caused by: java.lang.OutOfMemoryError: Java heap space
  111. at java.lang.String.replace(String.java:2057)
  112. at sun.reflect.AccessorGenerator.internalize(AccessorGenerator.java:402)
  113. at sun.reflect.AccessorGenerator.getClassName(AccessorGenerator.java:396)
  114. at sun.reflect.MethodAccessorGenerator.generate(MethodAccessorGenerator.java:286)
  115. at sun.reflect.MethodAccessorGenerator.generateSerializationConstructor(MethodAccessorGenerator.java:95)
  116. at sun.reflect.ReflectionFactory.newConstructorForSerialization(ReflectionFactory.java:313)
  117. at java.io.ObjectStreamClass.getSerializableConstructor(ObjectStreamClass.java:1322)
  118. at java.io.ObjectStreamClass.access$1500(ObjectStreamClass.java:50)
  119. at java.io.ObjectStreamClass$2.run(ObjectStreamClass.java:435)
  120. at java.security.AccessController.doPrivileged(Native Method)
  121. at java.io.ObjectStreamClass.<init>(ObjectStreamClass.java:411)
  122. at java.io.ObjectStreamClass.lookup(ObjectStreamClass.java:308)
  123. at java.io.ObjectStreamClass.initNonProxy(ObjectStreamClass.java:545)
  124. at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1599)
  125. at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1494)
  126. at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1599)
  127. at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1494)
  128. at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1748)
  129. at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1327)
  130. at java.io.ObjectInputStream.readObject(ObjectInputStream.java:349)
  131. at hudson.console.AnnotatedLargeText.createAnnotator(AnnotatedLargeText.java:131)
  132. at hudson.console.AnnotatedLargeText.writeHtmlTo(AnnotatedLargeText.java:157)
  133. at hudson.console.AnnotatedLargeText.writeLogTo(AnnotatedLargeText.java:146)
  134. at org.kohsuke.stapler.framework.io.LargeText.doProgressText(LargeText.java:262)
  135. at hudson.console.AnnotatedLargeText.doProgressiveHtml(AnnotatedLargeText.java:94)
  136. at sun.reflect.GeneratedMethodAccessor586.invoke(Unknown Source)
  137. at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  138. at java.lang.reflect.Method.invoke(Method.java:597)
  139. at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:288)
  140. at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:151)
  141. at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:90)
  142. at org.kohsuke.stapler.MetaClass$1.doDispatch(MetaClass.java:111)
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

上一篇:HDU 2163 Palindromes


下一篇:1064: [Noi2008]假面舞会 - BZOJ