When investigating the cause of long garbage collection cycles, it is often useful to enable GC logging, which is link:enable gc logging.adoc[documented here]. Once this is enabled, you can look through the GC log file for signs of problems.
When looking for Full GC messages, pay special attention to the details of the message.
If you see something like:
In this case you are likely looking at a situation where the application code is invoking a full garbage collection cycle, whether or not it is needed. It is recommended to allow the JVM to make decisions on how and when to run garbage collection so as not to force unnecessary “stop the world” events.