Eclipse部署多个Web项目内存溢出,java.lang.OutOfMemoryError: PermGen space
来源:互联网 发布:云远程监控软件 编辑:程序博客网 时间:2024/04/29 16:48
一、问题描述
在Eclipse中启动Tomcat(部署2个项目时),访问时,出现java.lang.OutOfMemoryError: PermGen space
原因就是内存溢出,因为Tomcat本身默认的内存是比较小的,如果部署多个项目,内存就不够用了,因为需要把内存修改得大点。
错误信息如下:
- 2016-9-20 10:25:21 org.apache.catalina.core.StandardWrapperValve invoke
- 严重: Servlet.service() for servlet [spring] in context with path [/businesshall] threw exception [Handler processing failed; nested exception is java.lang.OutOfMemoryError: PermGen space] with root cause
- java.lang.OutOfMemoryError: PermGen space
- at java.lang.ClassLoader.defineClass1(Native Method)
- at java.lang.ClassLoader.defineClassCond(Unknown Source)
- at java.lang.ClassLoader.defineClass(Unknown Source)
- at java.security.SecureClassLoader.defineClass(Unknown Source)
- at java.net.URLClassLoader.defineClass(Unknown Source)
- at java.net.URLClassLoader.access$000(Unknown Source)
- at java.net.URLClassLoader$1.run(Unknown Source)
- at java.security.AccessController.doPrivileged(Native Method)
- at java.net.URLClassLoader.findClass(Unknown Source)
- at java.lang.ClassLoader.loadClass(Unknown Source)
- at java.lang.ClassLoader.loadClass(Unknown Source)
- at org.apache.jasper.compiler.ParserController.getPageEncodingForJspSyntax(ParserController.java:479)
- at org.apache.jasper.compiler.ParserController.determineSyntaxAndEncoding(ParserController.java:420)
- at org.apache.jasper.compiler.ParserController.doParse(ParserController.java:190)
- at org.apache.jasper.compiler.ParserController.parseDirectives(ParserController.java:119)
- at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:194)
- at org.apache.jasper.compiler.Compiler.compile(Compiler.java:374)
- at org.apache.jasper.compiler.Compiler.compile(Compiler.java:354)
- at org.apache.jasper.compiler.Compiler.compile(Compiler.java:341)
- at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:662)
- at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:364)
- at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:395)
- at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:339)
- at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
- at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
- at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
- at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:748)
- at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:486)
- at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:411)
- at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:338)
- at org.springframework.web.servlet.view.InternalResourceView.renderMergedOutputModel(InternalResourceView.java:209)
- at org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:267)
二、解决方案下载
1、在Eclipse点击Tomcat打开配置页面,如下图所示:
2、点击open launch configuration下载
3、进入Arguments标签项
4、配置VM Arguments,加入内存的相关配置,如下图所示:
- -Xms512m -Xmx1024m
- -XX:PermSize=512M
- -XX:MaxPermSize=1024M
0 0
- Eclipse部署多个Web项目内存溢出,java.lang.OutOfMemoryError: PermGen space
- Eclipse部署多个Web项目内存溢出,java.lang.OutOfMemoryError: PermGen space
- idea热部署内存溢出:java.lang.OutOfMemoryError: PermGen space
- 解决Java项目内存溢出:Java.lang.OutOfMemoryError:PermGen space
- 彻底解决Eclipse 5.2内存溢出:java.lang.OutOfMemoryError: PermGen space
- java.lang.OutOfMemoryError: PermGen space 内存溢出
- 内存溢出--java.lang.OutOfMemoryError: PermGen space
- 内存溢出:java.lang.OutOfMemoryError: PermGen space
- 内存溢出 java.lang.OutOfMemoryError: PermGen space
- java.lang.OutOfMemoryError: PermGen space 内存溢出
- Eclipse中通过Tomcat运行JavaWeb项目发生内存溢出:java.lang.OutOfMemoryError: PermGen space 错误的解决方案
- Eclipse中通过Tomcat运行JavaWeb项目发生内存溢出:java.lang.OutOfMemoryError: PermGen space 错误的解决方案
- Eclipse中通过Tomcat运行JavaWeb项目发生内存溢出:java.lang.OutOfMemoryError: PermGen space 错误的解决方案
- Exception -- java.lang.OutOfMemoryError: PermGen space” -- java内存溢出异常
- JAVA内存溢出,java.lang.OutOfMemoryError: PermGen space
- resin内存溢出 java.lang.OutOfMemoryError: PermGen space
- java.lang.OutOfMemoryError: PermGen space内存溢出解决
- 解决Tomcat内存溢出错误 java.lang.OutOfMemoryError: PermGen space
- 办公必备的技巧-如何将excel转换成pdf
- Filter
- 【Red5】OBS(0.15.4)+Red5(1.0.7)视频直播(一)
- Git版本控制
- 微服务架构的基础框架选择:Spring Cloud还是Dubbo?
- Eclipse部署多个Web项目内存溢出,java.lang.OutOfMemoryError: PermGen space
- js获取网页屏幕可见区域高度
- CENTOS安装ElasticSearch
- 第一次使用Android Studio时你应该知道的一切配置
- linux下实时查看tomcat运行日志
- 原生移动端滑动js
- eclipse项目提交到svn步骤
- (八)1 总线、设备和驱动
- HTTP和HTTPS的区别