1

I am trying to deploy WSO2 Message Broker and I get the following error in server startup and terminated. How to fix this ?

java.lang.OutOfMemoryError: unable to create new native thread

1 Answer 1

2

This is very interesting error. The exception tell us the Out Of Memory but what actually happens is by nature linux system allows limited number of treads for specific user. If you try to run more threads than this number this error will occurred. You can see the allowed number of threads using following command

ulimit -u

The fix is simple. Just run the below command before you try to invoke the program

ulimit -u 2000

(The number 2000 depends on your application and you can decide it)

This fix is temporary and for the permanent fix please see the following blog post click here

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.