java.lang.OutOfMemoryError: PermGen space Solving Tomcat OutOfMemoryError: Heap space and PermGen space
来源:互联网 发布:mysql和mariadb兼容性 编辑:程序博客网 时间:2024/05/29 06:56
Solving Tomcat OutOfMemoryError: Heap space and PermGen space
Tomcat March 12th, 2009
It’s quite common to run In memory problems when running some big Java EE application on a Tomcat server.
Some of the most commmon errors are like the following ones.
This is about a full Heap space:
SEVERE: Servlet.service() for servlet jsp threw exceptionjava.lang.OutOfMemoryError: Java heap space
This other is about the PermGen space that’s a memory area, where compiled classes (and JSPs
) are kept, and this error might happen often if the running web application have many .java and .jsp.
MemoryError: PermGen spacejava.lang.OutOfMemoryError: PermGen space
To increase the memory available to Tomcat, about heap and permgen the correct options are the following ones.
This sets the max heap available to Tomcat at 1Gb of memory:
--JvmMx 1024
This sets the max permgen available to Tomcat at 256Mb of memory:
-XX:MaxPermSize=256m
To change the Tomcat memory settings (when Tomcat is installed on Windows as system service), it’s required to use the command-line tool tomcat6
. The next command changes the memory settings for the Tomcat service named Tomcat6
tomcat6 //US//Tomcat6 --JvmMx 1024 ++JvmOptions="-XX:MaxPermSize=256m"
The label //US//Tomcat6
has the meaning of Updating Server parameters for the service named Tomcat6.
Obviously this command should be executed from the directory C:/Program Files/Apache Software Foundation/Tomcat 6.0/bin
or from wherever is the bin
directory of your Tomcat installation. Or to make things simple, that directoy should be added to your PATH
environment variable.
It’s even possible to update memory settings from a GUI frontend, or to view what happened after running the command line tool. Running the following command:
tomcat6w //ES//Tomcat6
a window will open showing all the parameters about the windows service Tomcat6.
It’s possible to see in this image that, after running the previous command, for setting higher memory limits, in the sections Maximum memory pool and at the end of the Java Options the new memory limits are set.
- java.lang.OutOfMemoryError: PermGen space Solving Tomcat OutOfMemoryError: Heap space and PermGen space
- java.lang.OutOfMemoryError: heap space、PermGen space
- java.lang.OutOfMemoryError: PermGen space PermGen space
- tomcat 提示 java.lang.OutOfMemoryError: PermGen space
- Tomcat-----------------java.lang.OutOfMemoryError: PermGen space
- tomcat:java.lang.outofmemoryerror permgen space
- Tomcat – java.lang.OutOfMemoryError: PermGen space
- tomcat java.lang.OutOfMemoryError: PermGen space
- tomcat 7 java.lang.OutOfMemoryError: PermGen space
- Tomcat – java.lang.OutOfMemoryError: PermGen space
- Tomcat java.lang.OutOfMemoryError: PermGen space解决
- MyEclipse tomcat java.lang.OutOfMemoryError: PermGen space
- tomcat部署 java.lang.OutOfMemoryError: PermGen space
- tomcat:Java.Lang.OutOfMemoryError: PermGen Space
- tomcat内存java.lang.OutOfMemoryError: PermGen space
- Tomcat – Java.Lang.OutOfMemoryError: PermGen Space
- tomcat:java.lang.outofmemoryerror permgen space
- tomcat java.lang.OutOfMemoryError: PermGen space
- 程序员前进的动力
- 一些T-SQL语句
- Linux环境进程间通信(二): 信号(上)
- Cisco interview
- 把一个文件夹下所有文件,移动到另一个文件夹,不要目录,只要文件
- java.lang.OutOfMemoryError: PermGen space Solving Tomcat OutOfMemoryError: Heap space and PermGen space
- C++引用的内部机制,及于指针的区别
- CSDN的博客……
- 统计文件中某个词的个数
- MySQL replace into 用法
- Hunan Dream Fireworks
- 图片加水印
- makefile .c.o的说明
- 使用Excel COM组件导出数据后释放 Excel进程不能正常结束