springboot项目打war包时报GC
操作就是package,下图
我的解决方法:
添加JVM参数
- -XX:-UseGCOverheadLimit,无效
- 设置-Xmx到4096m也没有用,下图:
这是-Xmx4096m时的报错信息,如下:
系统资源不足。
有关详细信息, 请参阅以下堆栈跟踪。
java.lang.OutOfMemoryError: GC overhead limit exceeded
at com.sun.tools.javac.code.Type$UndetVar.substBounds(Type.java:1622)
at com.sun.tools.javac.comp.Infer$IncorporationStep$1.apply(Infer.java:648)
at com.sun.tools.javac.comp.Infer.checkWithinBounds(Infer.java:552)
at com.sun.tools.javac.comp.Infer$GraphSolver.solve(Infer.java:1592)
at com.sun.tools.javac.comp.Infer$InferenceContext.solve(Infer.java:2202)
at com.sun.tools.javac.comp.Infer$InferenceContext.solve(Infer.java:2194)
at com.sun.tools.javac.comp.Infer$InferenceContext.solve(Infer.java:2209)
at com.sun.tools.javac.comp.Infer.instantiateMethod(Infer.java:186)
at com.sun.tools.javac.comp.Resolve.rawInstantiate(Resolve.java:567)
at com.sun.tools.javac.comp.Resolve.selectBest(Resolve.java:1446)
at com.sun.tools.javac.comp.Resolve.findMethodInScope(Resolve.java:1633)
at com.sun.tools.javac.comp.Resolve.findMethod(Resolve.java:1704)
at com.sun.tools.javac.comp.Resolve.findMethod(Resolve.java:1677)
at com.sun.tools.javac.comp.Resolve.findFun(Resolve.java:1840)
at com.sun.tools.javac.comp.Resolve$8.doLookup(Resolve.java:2404)
at com.sun.tools.javac.comp.Resolve$BasicLookupHelper.lookup(Resolve.java:3097)
at com.sun.tools.javac.comp.Resolve.lookupMethod(Resolve.java:3348)
at com.sun.tools.javac.comp.Resolve.lookupMethod(Resolve.java:3333)
at com.sun.tools.javac.comp.Resolve.resolveMethod(Resolve.java:2400)
at com.sun.tools.javac.comp.Attr.visitIdent(Attr.java:3166)
at com.sun.tools.javac.tree.JCTree$JCIdent.accept(JCTree.java:2011)
at com.sun.tools.javac.comp.Attr.attribTree(Attr.java:576)
at com.sun.tools.javac.comp.Attr.visitApply(Attr.java:1825)
at com.sun.tools.javac.tree.JCTree$JCMethodInvocation.accept(JCTree.java:1465)
at com.sun.tools.javac.comp.Attr.attribTree(Attr.java:576)
at com.sun.tools.javac.comp.Attr.attribExpr(Attr.java:618)
at com.sun.tools.javac.comp.Attr.visitVarDef(Attr.java:1075)
at com.sun.tools.javac.tree.JCTree$JCVariableDecl.accept(JCTree.java:852)
at com.sun.tools.javac.comp.Attr.attribTree(Attr.java:576)
at com.sun.tools.javac.comp.Attr.attribStat(Attr.java:645)
at com.sun.tools.javac.comp.Attr.attribStats(Attr.java:661)
at com.sun.tools.javac.comp.Attr.visitBlock(Attr.java:1124)
请开发、架构师进行指导!感谢!