As part of a Spring Batch job, we are processing 1TB worth of data to our system.
After the process running for 4-5hours getting the OOM, when the job is terminated ideally the java heap has to be cleared. and when restarted it should start on the fresh heap. but for some reason when checked with jcmd -gccapacity OGC and OC values are showing full. How do we clear the Heap and restart the job as good as new run? This is production env, in lower env we had very less data so did not face any issue. meanwhile i am debugging the memory leaks in code. NOTE: We already used the -Xmx to 8GB.
NGCMN NGCMX NGC S0C S1C EC OGCMN OGCMX OGC OC MCMN MCMX MC CCSMN CCSMX CCSC YGC FGC CGC
0.0 4194304.0 220160.0 0.0 0.0 220160.0 0.0 4194304.0 3974144.0 3974144.0 0.0 1224704.0 203840.0 0.0 1048576.0 28672.0 112 4 83
Please advice. Appreciate your help.