频繁 GC 导致的 Java 服务不响应
现象
Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "SimplePauseDetectorThread_0"
Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "metrics-logger-reporter-1-thread-1"
Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "RequestHouseKeepingService"
Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "http-nio-8000-ClientPoller" 问题排查与分析
# 进入 Docker 容器执行 top
# 一般 jps、ps -ef | grep java、top
$ top
top - 10:26:07 up 1 day, 4:13, 0 users, load average: 1.34, 1.37, 1.43
Tasks: 37 total, 1 running, 34 sleeping, 2 stopped, 0 zombie
%Cpu(s): 8.4 us, 0.6 sy, 0.0 ni, 90.8 id, 0.0 wa, 0.0 hi, 0.1 si, 0.0 st
KiB Mem : 32946036 total, 11481888 free, 12608160 used, 8855988 buff/cache
KiB Swap: 0 total, 0 free, 0 used. 19854660 avail Mem
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
1 root 20 0 13.716g 4.563g 16320 S 100.0 14.5 1297:10 java
1741 root 20 0 42812 3460 2960 S 0.3 0.0 0:00.03 top
1297 root 20 0 4296 728 640 S 0.0 0.0 0:00.00 sh
1302 root 20 0 4296 124 0 S 0.0 0.0 0:00.00 sh
1303 root 20 0 20696 2216 2020 S 0.0 0.0 0:00.00 script
1304 root 20 0 4296 764 680 S 0.0 0.0 0:00.00 sh
1305 root 20 0 20144 3744 2992 S 0.0 0.0 0:00.00 bash
...

总结
扩展
最后更新于