This message means that for some reason the garbage collector is taking an excessive amount of time (by default 98% of all CPU time of the process) and recovers very little memory in each run (by default 2% of the heap).
(该消息表示由于某种原因,垃圾收集器占用了过多的时间(默认情况下为该进程所有CPU时间的98%),并且每次运行时恢复的内存很少(默认为堆的2%)。)
This effectively means that your program stops doing any progress and is busy running only the garbage collection at all time.
(这实际上意味着您的程序停止任何进展,并且一直在忙于仅运行垃圾回收。)
To prevent your application from soaking up CPU time without getting anything done, the JVM throws this Error
so that you have a chance of diagnosing the problem.
(为了防止您的应用程序浪费CPU时间而不做任何事情,JVM抛出此Error
以便您有机会诊断问题。)
The rare cases where I've seen this happen is where some code was creating tons of temporary objects and tons of weakly-referenced objects in an already very memory-constrained environment.
(我见过这种情况的罕见情况是,某些代码在一个已经非常受内存限制的环境中创建了大量的临时对象和大量的弱引用对象。)
Check out this article for details (specifically this part ).
(请查看本文以了解详细信息(特别是本部分 )。)
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…