Sorry, i want to re-post my question:
i am getting java.lang.OutOfMemoryError: unable to create new native thread in server.log, these are some causes that I can think of, pls give your comment and advise how to resolve this problem:
1. The java.lang.OutOfMemoryError is caused by excessive threads being created. If it is, then how to destroy threads or connections created by client but not in use.
2. Caused by the server run out of memory. If it is, then what is the best setting for -Xms, -Xmx, -XXMaxPermSize etc...
3. Client does not close connection properly after using. If it is, what is the best way to close the connection to jboss server leaving no active thread on jboss server?
I am looking forward to hearing from your response.