Error java.lang.OutOfMemoryError: GC overhead limit exceeded

后端 未结 20 2441
攒了一身酷
攒了一身酷 2020-11-21 05:23

I get this error message as I execute my JUnit tests:

java.lang.OutOfMemoryError: GC overhead limit exceeded

I know what an OutOfMemo

20条回答
  •  难免孤独
    2020-11-21 05:35

    you can try to make changes on the server setting by referring to this image and increase the memory size for processing process changes highlighted in yellow

    you can also make changes to java heap by opening cmd-> set _java_opts -Xmx2g
    2g(2gigabytes) depending upon the complexity of your program

    try to use less constant variable and temp variables

提交回复
热议问题