set JAVA_OPTS=-Xms256m -Xmx512m -Djava.awt.headless=true -XX:MaxPermSize=256m -server
This argument works in run.bat of jboss but as i want to increase stack size i have added
-Xss512m
but it’s not working.
set JAVA_OPTS=-Xms256m -Xss512m -Xmx512m -Djava.awt.headless=true -XX:MaxPermSize=256m -server
What is wrong in it ?
The
-Xss512moption increases the size of every thread stack to 512 Mbytes. That’s crazy. I expect that this is causing JBoss to run out of memory.Why are you increasing the stack size in the first place? The default stack size should be fine for most purposes. If it isn’t big enough then there’s a good chance that either:
you have a bug in your program that is causing infinite recursion (and increasing the stack size won’t help) or …
you are using an algorithm that has a pathological case (and increasing the stack size is a bandaid).
Based on your comments, I’d guess that you are using a regex to parse an entire input document containing multiple records. The regex engine uses recursion to deal with repeating elements / groups.
Assuming that this is the problem, then the fix is to rewrite your parsing code.