You can avoid the above "java.lang.OutOfMemoryError: GC overhead limit exceeded" exception by disabling the GC overhead limit feature in Sun JDK 1.6 by adding the following argument to the start script of JVM:
However, please note that disabling the overhead limit only avoids getting the OutOfMemoryError at an early stage. The OutOfMemoryError is very likely to be thrown at a later stage, because it does not remove the underlying problem. You should still look into your application and JVM settings to find the cause of GC taking an excessively long time.
Seems like GC is taking a long time.
First try to increase the heap size and check if the issue is resolved.
MaxPermSize value should ideally be 1/3rd of 1/4th the max heap.