Java Thread Stack Size Parameter -XssM

Each thread in the JVM stores method call arguments, return addresses and other information in a dedicated stack of its own. If a JAVA thread processes a large number of structures (example as a result of recursive calls) the stack size may not be sufficient to hold the information. The thread crashes with StackOverflowError. In such cases increase the stack size using the JVM parameter Xss.

If the thread size is too large, the JVM runs into a risk of crashing with OutOfMemoryError - unable to create new native thread (too many threads, each thread has a large stack). You need to decrease the Xss.

To adjust this parameter on SAP J2EE engines, start Config Tool

  1. Select the Instance in the left side navigation pane
  2. On the right side pane, go to "VM Parameters" tab and then to the sub tab "Additional"
  3. Click on "New" if this is the first time you are adding Xss parameter
  4. Add -Xss<jvm-thread-stack-size>M (example -Xss3M) in the "Name" field
  5. Leave "Value (optional)" field empty
  6. Save the settings and restart the SAP J2EE cluster



Comments

Popular posts from this blog

OS/DB Migration - CMD. STR, TOC, EXT, R3load, DDLDBS.TPL and more

Fixing Inconsistent Table - Table activation fails due to inconsistency between DD and DB

301 Redirect Using SAP Web Dispatcher