Is there a way to increase heap size for Play Framework 2.1?
Below are some of the actions we have tried and it doesn't seems to take into effects: 1) Adding a "jvm.memory=-Xmx1024M -Xms2048M" parameter in conf/application.conf 2) Or follow the instruction in PlayFramework - ProductionConfiguration by typing start -Xms128M -Xmx512m -server http://www.playframework.com/documentation/2.1.2/ProductionConfiguration
How do we monitor if the heap size has been increased? Using Windows Task Manager, we monitor if the committed size has been increase (or are we doing the wrong thing?)
Edited[13/9/13]: We edit the xmx and xms parameter at play2/framework/build.bat file and it works. Is this the proper way to do it? Also any recommended value that you guys are currently using in the production?
Thanks for your help!
Under the DTM Properties, there is an option JVMOption1 (if JVMOption1 is already populated, use JVMOption2 and so on). Enter the value -Xmx2048m. Click on SAVE to save the changes. Once the changes are saved, a new version of Data Integration Server is triggered.
Maximum heap size is 1/4th of the computer's physical memory or 1 GB (whichever is smaller) by default. The maximum heap size can be overridden using -Xmx.
The default startup heap size is 1.5 GB. This value must be a number between 1.5 GB and the maximum amount of memory allowed by your operating system and JVM version. Consider the following examples: If you have a Windows system with a 32-bit JVM, then a process can have a maximum heap size of 2 GB.
To configure the Java Heap in UNIX environment, run these before starting dsp:
export JAVA_MIN_MEM=2048M
export JAVA_MAX_MEM=4128M
export JAVA_PERM_MEM=256M
start your script file.
When starting your application with staged start script, you can append jvm args directly. For example:
./target/start -Xms1g -Xmx2g -Xloggc:gc.log -verbose:gc -XX:+PrintGCDateStamps -server -Dhttp.port=24000 &
This will print gc logs to gc.log as well. So that you can verify whether heap size is really allocated.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With