I'm simulating a overload of a server and I'm getting this error:
java.lang.OutOfMemoryError: unable to create new native thread
I've read in this page http://activemq.apache.org/javalangoutofmemory.html, that I can increase the memory size. But how do I do that? Which file I need to modify,? I tried to pass the arguments by the bin/activemq script but no luck.
Your case corresponds to massive number of threads. There are 3 ways to solve it:
Note: If stack or heap is too small, it must cause another OutOfMemoryError.
You can specify them using ACTIVEMQ_OPTS shell variable (in UNIX). For example, run ActiveMQ as
ACTIVEMQ_OPTS=-Xss160k bin/activemq
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With