title: java.lang.OutOfMemoryError: unable to create new native thread in Java (Play Framework)
body: <p>In my application runs in amazon aws instance. In these i am getting the java.lang.OutofMemory error. My instance is running in ubuntu machine. Following is error I am getting. I have google about this but I am not find any solution about this error.</p>
  
  <pre><code>    java.lang.OutOfMemoryError: unable to create new native thread
          at java.lang.Thread.start0(Native Method)
          at java.lang.Thread.start(Thread.java:640)
          at java.util.concurrent.ThreadPoolExecutor.addIfUnderMaximumPoolSize(ThreadPoolExecutor.java:727)
          at java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:657)
          at org.apache.tomcat.util.threads.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:176)
          at org.apache.tomcat.util.threads.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:156)
          at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:325)
          at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
          at java.lang.Thread.run(Thread.java:662)
  </code></pre>
  
  <p>I want to know when these error is arise and how we will prevent this. </p>
  
  <p>Thanks inadvance.</p>