When running my Play App, I often get the following error: java.lang.OutOfMemoryError: GC overhead limit exceeded
I now want to increase the MaxHeapSize.
First, I applied the parameters to my startup script:
cd app_x
.../play/play-2.2.1/play clean compile stage
app_x/target/universal/stage/bin/app_x -J-Xmx3g
However, the parameters of the JVM stay the same. htop says
java -Xms1024m -Xmx1024m ...
for the process.
Then I configured the environment variable:
export _JAVA_OPTIONS="-Xmx3g"
I executed play test
and got:
Picked up _JAVA_OPTIONS: -Xmx3g
However, the Xmx parameters of the JVM didn't change either.
Thank you for helping me.