我的应用在Cloud Foundary中崩溃,并且在崩溃时显示在内存静态信息下方:
Memory usage:
Heap memory: init 603979776, used 37501288, committed 583860224, max 583860224
Hint: Heap memory is over 95% full. To increase it, increase the container size.
Non-heap memory: init 7667712, used 114661704, committed 124698624, max 421101568
Memory pool usage:
CodeHeap 'non-nmethods': init 2555904, used 1390464, committed 2555904, max 5828608
CodeHeap 'profiled nmethods': init 2555904, used 20410240, committed 26214400, max 131301376
CodeHeap 'non-profiled nmethods': init 2555904, used 5704448, committed 7012352, max 131305472
Metaspace: init 0, used 79194184, committed 80527360, max 80527360
Hint: Metaspace is over 95% full. To increase it, set -XX:MaxMetaspaceSize to a suitable value.
Compressed Class Space: init 0, used 7962368, committed 8388608, max 72138752
Eden Space: init 161087488, used 147696, committed 161087488, max 161087488
Survivor Space: init 20119552, used 0, committed 20119552, max 20119552
2019-03-15T17:52:16.76+0530 [APP/PROC/WEB/0] ERR jvmkill killing current process
Tenured Gen: init 402653184, used 37353592, committed 402653184, max 402653184
ERR Thread dump triggered at 2019-03-15 12:22:16
如果我们仔细观察,我的堆大小约为 603.97Mb ,而使用的堆大小仅为 37.5Mb 。仍然有日志说堆已 95%已满。我从日志中看到,Metaspace已超过 95%,这似乎是正确的。
不确定JVM为什么说堆是 95%填充。任何帮助将不胜感激。