JEE - Unveiling Java OOM (Out of Memory Error)

java.lang.OutOfMemoryError: Perm Space 

Only Oracle(Sun) HotSpot JVM has perm space.

 


java.lang.OutOfMemoryError: Java heap space 
java.lang.OutOfMemoryError: unable to create new native thread 
java.lang.OutOfMemoryError: requested xxxx bytes for Chunk::new. Out of swap space 

java.lang.OutOfMemoryError: GC overhead limit exceeded

 

It’s an alert from JVM and this generally means the GC spends excessive amount of time – by default, 98% of the total CPU time spent for the process – and is able to recover very little memory – less than 2% of the heap.

What to do to resolve this exception?

If you’re executing your own code, you’ve got a tough job at hand – to review your code.

1. You’re probably creating lots of temporary objects in a loop; See if created object(s) can be reused.
2. If it’s a genuine requirement, try increasing the max heap size (XmX) in JVM arguments.

I don’t want JVM to throw this alert. Can I disable it?
You can turn this off with the command line option -XX:-UseGCOverheadLimit

More on this here: http://www.oracle.com/technetwork/java/javase/gc-tuning-6-140523.html#par_gc.oom

java.lang.OutOfMemoryError: bitmap size exeeds VM budget

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值