I have an old Jboss server, with 5go of RAM. My java app is configured like that :
...-server -Xms3200m -Xmx3500m -XX:MaxPermSize=512M...
When I try to shutdown, it uses the same JAVA_OPTS as the start, so it fail. So I modify the shutdown.sh script, and add :
...
JAVA_OPTS='-Xms128m -Xmx128m -XX:MaxPermSize=128m'
export JAVA_OPTS
...
Everything works fine. But now, it's my JMX stats which don't work anymore, I assume they uses jstat to mesure the free heap.
When I do a :
./jstat -gccapacity PID
I have the message :
Could not reserve enough space for object heap
But I have 1go of RAM free on the server at this time ! What JAVA_OPTS jstat use work ?