Horcrux7
Horcrux7

Reputation: 24467

Retried waiting for GCLocker too often allocating 12488753 words

I see the follow output on my Java console. What this means? Why it occur?

[477.615s][warning][gc,alloc] mythreadname: Retried waiting for GCLocker too often allocating 12488753 words
[519.628s][warning][gc,alloc] mythreadname: Retried waiting for GCLocker too often allocating 12488753 words

Upvotes: 8

Views: 12356

Answers (2)

Saurabh Gupta
Saurabh Gupta

Reputation: 459

I was facing this issue when running mvn package. I was able to rectify this issue by adding below to my jvm.config

-Xmx1g
-XX:+UnlockDiagnosticVMOptions
-XX:GCLockerRetryAllocationCount=100

Before reaching to the solution I even tried -Xmx4g, whereas the result were intermittent(Passing at a 50% rate). Adding above fixed the underlying problem.

Upvotes: 0

Lonzak
Lonzak

Reputation: 9816

Although the links from sonnenhund looked promising (adding -XX:+UnlockDiagnosticVMOptions -XX:GCLockerRetryAllocationCount=100) it didn't help in my case. The error went away when I increased the overall heap memory for jmeter. For this I added a file (setenv.bat or setenv.sh) and put it in the jmeter/bin folder (this is suggested by jmeter).

# setenv.bat
set HEAP=-Xms1g -Xmx25g -XX:MaxMetaspaceSize=512M
set JVM_ARGS="-Dnashorn.args=--no-deprecation-warning"



#setenv.sh
#!/usr/bin/env bash
export HEAP="-Xms1g -Xmx25g -XX:MaxMetaspaceSize=512M"
export JVM_ARGS="-Dnashorn.args=--no-deprecation-warning"

Then the error went away...

Upvotes: 1

Related Questions