java.lang.OutOfMemoryError: requested 1958536 bytes for Chunk::new. Out of swap space

后端 未结 3 900
半阙折子戏
半阙折子戏 2020-12-16 22:23

We are facing the below problem at our production enviournment in unpredictable manner sometimes the server is down in a day or sometimes in a week, below is the exact error

3条回答
  •  刺人心
    刺人心 (楼主)
    2020-12-16 22:53

    For the record (and Google), this looks like both these bugs, which were fixed in the 1.6u22 release of sun's jdk. So, first thing to do is update your JVM. If it still happens, and always happens on a particular method, you can exclude that method from compilation (as long as you're aware of the performance implications of that) with the following jvm flag:

    -XX:CompileCommand=exclude,org/apache/velocity/runtime/directive/Foreach,render
    

    (as suggested here). But, first update your jvm.

提交回复
热议问题