GC Tuning - preventing a Full GC

后端 未结 5 387
清歌不尽
清歌不尽 2021-01-30 14:37

I\'m trying to avoid the Full GC (from gc.log sample below) running a Grails application in Tomcat in production. Any suggestions on how to better configure the GC?

5条回答
  •  说谎
    说谎 (楼主)
    2021-01-30 15:11

    Your survivor sizes aren't decreasing much, if at all - ideally they should be decreasing steeply, because you only want a minority of objects to survive long enough to reach the Old generation.

    This suggests that many objects are living a relatively long time - which can happen when you have many open connections, threads etc that are not handled quickly, for example.

    (Do you have any options to change the application, incidentally, or can you only modify the GC settings? There might also be Tomcat settings that would have an effect...)

提交回复
热议问题