Crash engine : GC overhead limit exceeded

hello ,

Is there any tips to investigate on such a Camunda engine crash ?
There a peak of memory and CPU usage

We can’t find the root cause .

Version 7.13

20-May-2021 15:29:37.355 SEVERE [http-nio-8080-exec-19] org.camunda.commons.logging.BaseLogger.logError ENGINE-16004 Exception while closing command context: GC overhead limit exceeded
        java.lang.OutOfMemoryError: GC overhead limit exceeded
                at java.lang.invoke.LambdaFormEditor.lambdaFormEditor(LambdaFormEditor.java:57)
                at java.lang.invoke.LambdaForm.editor(LambdaForm.java:917)
                at java.lang.invoke.BoundMethodHandle.editor(BoundMethodHandle.java:89)
                at java.lang.invoke.BoundMethodHandle.bindArgumentL(BoundMethodHandle.java:99)
                at java.lang.invoke.MethodHandles.insertArguments(MethodHandles.java:2379)
                at jdk.internal.dynalink.DynamicLinker.createRelinkAndInvokeMethod(DynamicLinker.java:224)
                at jdk.internal.dynalink.DynamicLinker.link(DynamicLinker.java:201)
                at jdk.nashorn.internal.runtime.linker.Bootstrap.bootstrap(Bootstrap.java:208)
                at jdk.nashorn.internal.runtime.linker.Bootstrap.createDynamicInvoker(Bootstrap.java:371)
                at jdk.nashorn.internal.runtime.linker.Bootstrap.createDynamicInvoker(Bootstrap.java:345)
                at jdk.nashorn.internal.runtime.linker.InvokeByName.<init>(InvokeByName.java:86)
                at jdk.nashorn.internal.runtime.linker.InvokeByName.<init>(InvokeByName.java:73)
                at jdk.nashorn.internal.objects.Global.<init>(Global.java:97)
                at jdk.nashorn.internal.runtime.Context.newGlobal(Context.java:1111)
                at jdk.nashorn.api.scripting.NashornScriptEngine$2.run(NashornScriptEngine.java:350)
                at jdk.nashorn.api.scripting.NashornScriptEngine$2.run(NashornScriptEngine.java:346)
                at java.security.AccessController.doPrivileged(Native Method)
                at jdk.nashorn.api.scripting.NashornScriptEngine.createNashornGlobal(NashornScriptEngine.java:346)
                at jdk.nashorn.api.scripting.NashornScriptEngine.<init>(NashornScriptEngine.java:143)
                at jdk.nashorn.api.scripting.NashornScriptEngineFactory.getScriptEngine(NashornScriptEngineFactory.java:148)
                at javax.script.ScriptEngineManager.getEngineByName(ScriptEngineManager.java:238)
                at org.camunda.bpm.engine.impl.scripting.engine.ScriptEngineResolver.getScriptEngine(ScriptEngineResolver.java:64)
                at org.camunda.bpm.engine.impl.scripting.engine.ScriptingEngines.getGlobalScriptEngine(ScriptingEngines.java:136)
                at org.camunda.bpm.engine.impl.scripting.engine.ScriptingEngines.getScriptEngineForLanguage(ScriptingEngines.java:112)
                at org.camunda.bpm.engine.impl.scripting.env.ScriptingEnvironment.execute(ScriptingEnvironment.java:82)
                at org.camunda.bpm.engine.impl.delegate.ScriptInvocation.invoke(ScriptInvocation.java:47)
                at org.camunda.bpm.engine.impl.delegate.DelegateInvocation.proceed(DelegateInvocation.java:58)
                at org.camunda.bpm.engine.impl.delegate.DefaultDelegateInterceptor.handleInvocationInContext(DefaultDelegateInterceptor.java:92)
                at org.camunda.bpm.engine.impl.delegate.DefaultDelegateInterceptor.handleInvocation(DefaultDelegateInterceptor.java:63)
                at org.camunda.bpm.engine.impl.scripting.ScriptCondition.evaluate(ScriptCondition.java:56)
                at org.camunda.bpm.engine.impl.scripting.ScriptCondition.evaluate(ScriptCondition.java:45)
                at org.camunda.bpm.engine.impl.bpmn.behavior.ExclusiveGatewayActivityBehavior.doLeave(ExclusiveGatewayActivityBehavior.java:64)

Thanks in advance .

Are you executing the scripts in exclusive gateway which has random value generator?