Java Virtual Machine (JVM): GC overhead limit exceeded error

Christopher West shared this question 7 years ago
Answered

In some instances, the Task Scheduler fails with the following error: GC overhead limit exceeded error

Once that occurs, Scheduled Broadcasts stop. At least for the broadcast report it failed on.

We have certain time periods where a large number of broadcasts are sent out.


I currently have the JVM memory set to 3.5 GB. I also added the -XX:MaxHeapFreeRatio option set at 70 to try to get some memory released back to the OS. Although not all available GCs seem to respect this.


Anyone have any suggestions on how to balance JVMs need to have all the memory with releasing in back to the OS?


Thanks,

Chris

Replies (1)

photo
1

Hi Chris,


I'm sorry to hear that you are running into the GC overhead limit exceeded error.


It sounds like you are pretty familiar with the 'why' of this error, and basically there isn't much of a way to avoid it unless you increase the amount of memory available to the JVM. I think you might already know how to do this, but in case you haven't before, information on increasing the JVM memory can be found here.


https://www.yellowfinbi.com/YFForum-JVM-Max-Memory-?thread=90378


If you are interested, you could gather info_threads while your scheduled tasks are running. This should give you some insight into your memory consumption. Information on the info_threads can be found here:


http://community.yellowfin.bi/knowledge-base/article/how-do-i-get-the-info_threads-page-and-what-does-this-do


Some customers have had luck with adding a garbage collector (-XX:+UseG1GC) to the PermGen space section of catalina.bat


e.g. set JAVA_OPTS=%JAVA_OPTS% -XX:PermSize=128m -XX:MaxPermSize=1024m -XX:+UseG1GC


For your reference, here is some documentation from Oracle that might help you troubleshoot garbage collection:


https://docs.oracle.com/cd/E40972_01/doc.70/e40973/cnf_jvmgc.htm#autoId2


There is a chance that you may be legitimately running out of memory when these tasks are kicking off, so this might not help here.


Anyway, let me know if this information helps. If you have any follow-up questions here, please let me know


Kind Regards,


Dustin

Leave a Comment
 
Attach a file