title: Java.lang.OutOfMemoryError: unable to create new native thread -Linux
body: <p>In my java batch application (Jboss ,OS -Linux) <strong>facing error- Java.lang.OutOfMemoryError: unable to create new native thread.</strong>
  <strong>while launching new JVM instance</strong></p>
  
  <p>Below are the related server and OS level setting.
  ulimit - u = 4096,
  ulimit -a = 4096 
  Java Heap setting - Xms3g -Xmx32 g (total physical memory 64g).
  JVM stack size - 1024mb
  PermGen space - 512 mb</p>
  
  <p>Whenever we face this issue, We checking thread (process) count on linux server, and its always less than 1000. Java heap memory is also under controlled.</p>
  
  <p>Most of the time server(jobss)restart fix the issue temporally . </p>