Here is the reprint is to do the notes for yourself
problem : The application will hang up after a period of time (process in, but stop responding, also no log output), you must restart Tomcat
Reason Lookup :
Since there is no error in Tomcat's own log, enough disk space, read and write, and other reasons suspected of a JVM crash, then check the GC log:
It can be seen that every time the full GC is the old memory footprint is quite small, far from reaching its maximum value, the same as the persistent generation, and each time after the GC, the amount of basic no change, that is, every time the full GC is doing no work, wasted a large number of performance. In terms of memory usage, it is not enough memory allocation, it should be a problem with the program code, so look for development assistance. Later, with the assistance of the relevant developers found in the code in the active call System.GC (), the web search, and found that even the official website is not recommended in the Code System.GC (), also do not dare to ensure the use of its impact on the performance and stability of the application. In fact, from the JVM configuration level can also disable the active GC () method call, plus the parameter "-XX:+DISABLEEXPLICITGC" on it, and then add this parameter restart Tomcat, over a period of time to view GC Log,ok, the reason to find, problem solving! The background is also for development. It is recommended that you do not invoke the System.GC () method in your code to automatically process the GC with the JVM itself.
workaround : The JVM is configured with the parameter "-XX:+DISABLEEXPLICITGC", and the Code prohibits calling System.GC ();
The app will hang up for a while (the process is in, but it stops responding, and there is no log output) and you must restart Tomcat