About FullGC in API Gateway
search cancel

About FullGC in API Gateway

book

Article ID: 115954

calendar_today

Updated On:

Products

STARTER PACK-7 CA Rapid App Security CA API Gateway

Issue/Introduction



In Gateway server, FullGC runs every 10 hours.
Check GC.logs.
System.gc () is called every 10 hours.
Does API Gateway has such that task?

Environment

API Gateway 

Resolution


API Gateway does not have thattasks.

The reason for FullGC trigger for every 10 hours. 
This is triggered by the third party library - apache cxf jaxws library.
When gateway starts the corresponding bean gets loaded and the apache cxf library creates and schedules  sun.misc.GC$Daemon for every 10 hours and which in turn calls System.GC(). 
The schedule is set through org.apache.cxf.common.logging.JDKBugHacks and the class documentation says, "This is called from LogUtils as LogUtils is almost always one of the VERY first classes loaded in CXF so we can try and register to hacks/workarounds for various bugs in the JDK. 
Much of this is taken from work the Tomcat folks have done to find places where memory leaks and jars are locked and such." 
The GC scheduling can be disabled by setting the property org.apache.cxf.JDKBugHacks.gcRequestLatency to false in System.properties file if necessary.