The web application [ROOT] appears to have started a thread named XXXXXX but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
可以先打开idea右下角的内存显示:
image.png
没有的话可以先去设置里打开:
image.png image.png image.png
打开后输入下面的代码覆盖文件即可修改成2G:
-Xms1024m
-Xmx2048m
-XX:ReservedCodeCacheSize=1024m
-XX:+UseConcMarkSweepGC
-Dfile.encoding=UTF-8
-XX:+UseConcMarkSweepGC
-XX:SoftRefLRUPolicyMSPerMB=50
-ea
-Dsun.io.useCanonCaches=false
-Djava.net.preferIPv4Stack=true
-XX:+HeapDumpOnOutOfMemoryError
-XX:-OmitStackTraceInFastThrow
-Xverify:none
-XX:ErrorFile=$USER_HOME/java_error_in_idea_%p.log
-XX:HeapDumpPath=$USER_HOME/java_error_in_idea.hprof
重启idea
如果是修改单个占用的JVM内存可以在项目配置里修改 VM options:
image.png
填入信息:
-Xms1024m -Xmx2048m
网友评论