你自己看一下分配给你的内存吧 在java中,堆(heap)是对象被创建后所驻留的内存区。 //获取堆的当前大小,单位为字节(Byte),下同 long heapSize = Runtime.getRuntime().totalMemory();
// 获取堆内存的最大值,堆所占用的内存不能超过这个值. // 否则将导致异常(OutOfMemoryException) long heapMaxSize = Runtime.getRuntime().maxMemory();
// 获取堆中空闲内存的大小. 这个值会随着垃圾回收(GC)而增加, // 也会随着新对象的创建而减小 long heapFreeSize = Runtime.getRuntime().freeMemory();
TP-Processor6" Exception in thread "TP-Processor8" java.lang.OutOfMemoryError: PermGen space Exception in thread "TP-Processor5" java.lang.OutOfMemoryError: PermGen space Exception in thread "TP-Processor1" java.lang.OutOfMemoryError: PermGen space Exception in thread "TP-Processor12" java.lang.OutOfMemoryError: PermGen space Exception in thread "TP-Processor10" java.lang.OutOfMemoryError: PermGen space Exception in thread "TP-Processor9" java.lang.OutOfMemoryError: PermGen space Exception in thread "TP-Processor11" java.lang.OutOfMemoryError: PermGen space Exception in thread "TP-Processor16" java.lang.OutOfMemoryError: PermGen space Exception in thread "TP-Processor14" java.lang.OutOfMemoryError: PermGen space Exception in thread "TP-Processor15" Exception in thread "TP-Processor13" java.lang.OutOfMemoryError: PermGen space java.lang.OutOfMemoryError: PermGen space Exception in thread "TP-Processor20" java.lang.OutOfMemoryError: PermGen space Exception in thread "TP-Processor18" java.lang.OutOfMemoryError: PermGen space Exception in thread "TP-Processor19" java.lang.OutOfMemoryError: PermGen space Exception in thread "TP-Processor17" java.lang.OutOfMemoryError: PermGen space Exception in thread "cn.js.fan.kernel.Scheduler" java.lang.OutOfMemoryError: PermGen space Exception in thread "TP-Processor24" java.lang.OutOfMemoryError: PermGen space Exception in thread "TP-Processor23" java.lang.OutOfMemoryError: PermGen space Exception in thread "TP-Processor21" Exception in thread "TP-Processor22" java.lang.OutOfMemoryError: PermGen space java.lang.OutOfMemoryError: PermGen space Exception in thread "TP-Processor28" java.lang.OutOfMemoryError: PermGen space Exception in thread "TP-Processor27" java.lang.OutOfMemoryError: PermGen space Exception in thread "TP-Processor26" java.lang.OutOfMemoryError: PermGen space Exception in thread "TP-Processor25" java.lang.OutOfMemoryError: PermGen space Exception in thread "TP-Processor32" java.lang.OutOfMemoryError: PermGen space Exception in thread "TP-Processor31" java.lang.OutOfMemoryError: PermGen space Exception in thread "TP-Processor30" java.lang.OutOfMemoryError: PermGen space 一段溢出代码 好像是数据库的内存溢出 会不会是数据库连接数有限制的问题 我自己的机器上确实没有这个问题
在java中,堆(heap)是对象被创建后所驻留的内存区。 //获取堆的当前大小,单位为字节(Byte),下同
long heapSize = Runtime.getRuntime().totalMemory();
// 获取堆内存的最大值,堆所占用的内存不能超过这个值.
// 否则将导致异常(OutOfMemoryException)
long heapMaxSize = Runtime.getRuntime().maxMemory();
// 获取堆中空闲内存的大小. 这个值会随着垃圾回收(GC)而增加, // 也会随着新对象的创建而减小
long heapFreeSize = Runtime.getRuntime().freeMemory();
Exception in thread "TP-Processor5" java.lang.OutOfMemoryError: PermGen space
Exception in thread "TP-Processor1" java.lang.OutOfMemoryError: PermGen space
Exception in thread "TP-Processor12" java.lang.OutOfMemoryError: PermGen space
Exception in thread "TP-Processor10" java.lang.OutOfMemoryError: PermGen space
Exception in thread "TP-Processor9" java.lang.OutOfMemoryError: PermGen space
Exception in thread "TP-Processor11" java.lang.OutOfMemoryError: PermGen space
Exception in thread "TP-Processor16" java.lang.OutOfMemoryError: PermGen space
Exception in thread "TP-Processor14" java.lang.OutOfMemoryError: PermGen space
Exception in thread "TP-Processor15" Exception in thread "TP-Processor13" java.lang.OutOfMemoryError: PermGen space
java.lang.OutOfMemoryError: PermGen space
Exception in thread "TP-Processor20" java.lang.OutOfMemoryError: PermGen space
Exception in thread "TP-Processor18" java.lang.OutOfMemoryError: PermGen space
Exception in thread "TP-Processor19" java.lang.OutOfMemoryError: PermGen space
Exception in thread "TP-Processor17" java.lang.OutOfMemoryError: PermGen space
Exception in thread "cn.js.fan.kernel.Scheduler" java.lang.OutOfMemoryError: PermGen space
Exception in thread "TP-Processor24" java.lang.OutOfMemoryError: PermGen space
Exception in thread "TP-Processor23" java.lang.OutOfMemoryError: PermGen space
Exception in thread "TP-Processor21" Exception in thread "TP-Processor22" java.lang.OutOfMemoryError: PermGen space
java.lang.OutOfMemoryError: PermGen space
Exception in thread "TP-Processor28" java.lang.OutOfMemoryError: PermGen space
Exception in thread "TP-Processor27" java.lang.OutOfMemoryError: PermGen space
Exception in thread "TP-Processor26" java.lang.OutOfMemoryError: PermGen space
Exception in thread "TP-Processor25" java.lang.OutOfMemoryError: PermGen space
Exception in thread "TP-Processor32" java.lang.OutOfMemoryError: PermGen space
Exception in thread "TP-Processor31" java.lang.OutOfMemoryError: PermGen space
Exception in thread "TP-Processor30" java.lang.OutOfMemoryError: PermGen space
一段溢出代码 好像是数据库的内存溢出 会不会是数据库连接数有限制的问题
我自己的机器上确实没有这个问题
在运行是加入下面这几个参数试试。
-XX:PermSize=64M
-XX:MaxPermSize=128M在网上找了一段解释:
PermGen space的全称是Permanent Generation space,是指内存的永久保存区域,这块内存主要是存放Class和Meta信息的,Class在被Loader时就会被放到PermGen space中,它和存放类实例(Instance)的Heap区域不同,GC(Garbage Collection)不会在主程序运行期对PermGen space进行清理,所以如果APP会LOAD很多CLASS的话,就很可能出现PermGen space错误,这种错误常见在web服务器对JSP进行pre compile的时候。有些网页说得很详细:
http://www.wujianrong.com/archives/2006/12/javalangoutofmemoryerror_permg.html
http://www.totodotnet.net/2007/08/15/outofmemory%ef%bc%9apermgen-space%e5%bc%82%e5%b8%b8%e7%9a%84%e5%a4%84%e7%90%86%e5%92%8c%e5%88%86%e6%9e%90/