AMQ214013: Failed to decode packet: java.lang.OutOfMemoryError: unable to create new native thread

364 views
Skip to first unread message

valsaraj pv

unread,
Jul 14, 2021, 8:35:14 AM7/14/21
to WildFly
Hi,

What might be the reason for the following error during load tests with concurrent users?
ERROR [org.apache.activemq.artemis.core.client] (Thread-286 (org.apache.activemq.artemis.core.remoting.impl.invm.InVMConnector)) AMQ214013: Failed to decode packet: java.lang.OutOfMemoryError: unable to create new native thread

Thanks!

Vesa Tuononen

unread,
Jul 14, 2021, 8:54:44 AM7/14/21
to valsaraj pv, WildFly
Hi,

Seems to be OOME
Hard to say why if only see the log row. 

SET system property to produce hprof file when OOME

Then open that file by using Eclipse Mat and check what data you have in memory.



--
You received this message because you are subscribed to the Google Groups "WildFly" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wildfly+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/wildfly/CAOA-0Xtcd1J_R43EU7r1FHH0dhK7mueF4FXqg5GnKcJm9KaLaw%40mail.gmail.com.

valsaraj pv

unread,
Jul 15, 2021, 9:35:56 AM7/15/21
to WildFly
Is there any option to restrict the max number of threads like we set max limit on datasource?
--
Life is like this: "Just when we get all the answers of life.... God changes the question paper....

Valsaraj Viswanathan

Jasvant Singh

unread,
Jul 16, 2021, 1:15:00 AM7/16/21
to WildFly
Hi,
In Linux there a limit to number of threads a user can create. When this limit is reached new thread creation throws up OutOfMemoryError. You can increase limit by 'ulimit' or decrease thread pool size to stay within limit.

Thanks,
Jasvant

valsaraj pv

unread,
Jul 16, 2021, 4:11:44 AM7/16/21
to Jasvant Singh, WildFly
Thanks Jasvant!
Would you share how to decrease thread pool size? 

--
You received this message because you are subscribed to the Google Groups "WildFly" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wildfly+u...@googlegroups.com.

Jasvant Singh

unread,
Jul 16, 2021, 8:33:47 AM7/16/21
to valsaraj pv, WildFly
Hi,
I am not sure how to decrease thread pool size but the following page can help you increase the system limit.


Thanks,
Jasvant

Jasvant Singh

unread,
Jul 16, 2021, 9:06:29 AM7/16/21
to valsaraj pv, WildFly
Hi,

"max user process" limit is for all processes running for that user.
You can run the "ps -fL -u <userid>" command to list all threads running for a user.
You might have to run this command as root because if you have hit the limit then this command might also fail to run.
There might be other applications which are causing problems rather than wildfly.

Thanks,
Jasvant

Jasvant Singh

unread,
Jul 16, 2021, 9:15:04 AM7/16/21
to valsaraj pv, WildFly
The command "ps -fL <pid> |wc -l"  will give you the number of threads for that process. My wildfly is consuming 100 threads.

Vesa Tuononen

unread,
Jul 16, 2021, 9:47:22 AM7/16/21
to valsaraj pv, WildFly
Reply all
Reply to author
Forward
0 new messages