更新时间:2022-06-10 23:08:01
这些大致按照我尝试它们的顺序列出,具体取决于收集的证据:
These are listed roughly in the order I would try them, depending on the evidence collected:
newInstance()
和上面的其他一些被阻止.使用 -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -verbose:gc
运行您的 VM 并记录输出.您是否在故障/锁定时间附近看到过多的 GC 时间?OutOfMemoryError
,您可以调整 GC 可调参数...参见 JDK6.0 XX 选项,或 JDK6.0 GC 调优白皮书.具体看-XX:+UseGCOverheadLimit
和-XX:+GCTimeLimit
及相关选项.(注意这些没有很好的记录,但可能有用...)newInstance()
and a few others above being blocked. Run your VM with -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -verbose:gc
and log the output. Are you seeing excessive GC times near the time of failure/lockup?
OutOfMemoryError
when you should, you can tune the GC tunables... see JDK6.0 XX options, or JDK6.0 GC Tuning Whitepaper. Look specifically at -XX:+UseGCOverheadLimit
and -XX:+GCTimeLimit
and related options. (note these are not well documented, but may be useful...)