permaculture playing cards*
The moose likes Tomcat and the fly likes GC overhead limit exceeded Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "GC overhead limit exceeded" Watch "GC overhead limit exceeded" New topic
Author

GC overhead limit exceeded

Isaac Ferguson
Ranch Hand

Joined: Jun 22, 2012
Posts: 336
Hi all,

I get the next error



It happens if I use several users in Jmeter for example 20.

I have in my JVM 6 G memory. And I have increase the CPU. Any idea please?

Thanks
K. Gil
Ranch Hand

Joined: Apr 29, 2011
Posts: 75

> java.lang.OutOfMemoryError: GC overhead limit exceeded

that means exactly "GC overhead limit exceeded". Please don't be confused with "OutOfMemoryError", as that's just a secondary information in this case. Generally speaking, GC is pretty uncontrolled, more objects you destroy quickly, more chance that GC will struggle. Also, this message means that GC (garbage collector) is taking an excessive amount of time (by default 98% of all CPU time of the process) and recovers little memory in each run (by default 2% of the heap). So when you keeping increasing heap size to cosmic amount without a good reason (is your tomcat really use all of this?) will cause... that 2% of heap limit for GC increase, which may cause "GC overhead limit exceeded" exceptions even often.

You can try to add switch to disable errors: -XX:-UseGCOverheadLimit
But when GC struggle with GC tasks, everything can happen next.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: GC overhead limit exceeded