How to modify the maximum Java Heap Size in TorqueBox gem

In order to modify the maximum Java Heap Size (or any other JAVA_OPTS) when using the TorqueBox gem, start torquebox by doing a:


torquebox run

Look for the default JAVA_OPTS settings and set your JAVA_OPTS path. Be sure you aren’t overriding your current settings first.

In my case, for TorqueBox 2.3.0, I wanted to modify the maximum Java Heap Size from 512 mb to 1024 mb.

Here is what I executed:


$ export JAVA_OPTS="-d32 -client -Xms64m -Xmx1024m -XX:MaxPermSize=256m -Djava.net.preferIPv4Stack=true -Dorg.jboss.resolver.warning=true -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true -Djboss.server.default.config=standalone.xml -Xss2048k -Djruby.compile.invokedynamic=false -Dorg.quartz.scheduler.skipUpdateCheck=true"

VN:F [1.9.22_1171]
Rating: 0.0/5 (0 votes cast)
VN:F [1.9.22_1171]
Rating: 0 (from 0 votes)
Facebook Twitter Email

Leave a Reply