> 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.