请教关于tomcat下内存溢出的问题

07-02-12 liuhuizhuo
请救各位,有那位知道tomcat在什么情况下会出现这样的情况

[Unloading class sun.reflect.GeneratedSerializationConstructorAccessor135]

[Unloading class sun.reflect.GeneratedSerializationConstructorAccessor130]

[Unloading class sun.reflect.GeneratedSerializationConstructorAccessor147]

[Unloading class sun.reflect.GeneratedSerializationConstructorAccessor156]

[Unloading class sun.reflect.GeneratedSerializationConstructorAccessor169]

[Unloading class sun.reflect.GeneratedSerializationConstructorAccessor132]

[Unloading class sun.reflect.GeneratedSerializationConstructorAccessor131]

[Unloading class sun.reflect.GeneratedMethodAccessor1]

[Unloading class sun.reflect.GeneratedSerializationConstructorAccessor168]

[Unloading class sun.reflect.GeneratedSerializationConstructorAccessor148]

[Unloading class sun.reflect.GeneratedSerializationConstructorAccessor133]

Exception in thread "org.apache.catalina.cluster.tcp.TcpReplicationThread[6]" java.lang.OutOfMemoryError: Java heap space

Exception in thread "Thread-11" java.lang.OutOfMemoryError: Java heap space

Exception in thread "org.apache.catalina.cluster.tcp.TcpReplicationThread[1]" java.lang.OutOfMemoryError: Java heap space

Exception in thread "Thread-13" java.lang.OutOfMemoryError: Java heap space

wolf00781
2007-02-13 09:35
根本的原因是程序占用了太多了资源,要优化你的程序了,不过可以修改你的JVM的空间可以支持一下吧

liuhuizhuo
2007-02-17 09:30
CATALINA_OPTS="-server -Xms1024m -Xmx1024m -XX:PermSize=512m -XX:MaxPermSize=512m -XX:NewSize=256m -XX:MaxNewSize=256m -Xloggc:/usr/local/tomcat1/logs/gc.log -Xconcurrentio -Xincgc -Xconcgc"

这是tomcat的配置,每台服务器的物理内存为4个G,同时运行两个TOMCAT,每个TOMCAT都分配了一个G的内存,但还是报java heap space错误,JVM在CATALINA_OPTS中也可以调整吧???????

猜你喜欢