About FullGC in API Gateway

Document ID : KB000115954
Last Modified Date : 27/09/2018
Show Technical Document Details
Question:
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 
Answer:

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.