问题
I have a Wildfly AS
setup for JMS, I;m monitoring it with Jconsole and have noticed that before I even create a session on my Consumer
or Producer
the thread count is steadily increasing, I was previously using Wildfly 9 final
for the same purpose, it's thread usage was steady even during use, but it had a memory leak which prompted me to upgrade.
In Jconsole
I can see:
Thread-2(ActiveMQ-client-global-threads-3258368)
Thread-4(ActiveMQ-client-global-threads-3258368)
Thread-5(ActiveMQ-client-global-threads-3258368)
Thread-6(ActiveMQ-client-global-threads-3258368)
.
.
.
Thread-16(ActiveMQ-client-global-threads-3258368)
How do I solve this problem? is there a setting I can change that is causing these threads to spawn, is there any more information I can take from Jconsole
to help me resolve this?
回答1:
Update: I tried with this configuration and it doesn't work for me. The reason is that ActiveMq Artemis uses a fixed thread pool executor and it is configured to 500 threads. It will be solved in Wildfly after somoe changes in Artemis. You can check the status in Jira (look in the last comments):
https://issues.jboss.org/browse/JBEAP-2947
Forum:
https://developer.jboss.org/thread/268397
Workaround:
sh standalone.sh -c standalone-full.xml -Dactivemq.artemis.client.global.thread.pool.max.size=30
Original Answer:
Have you tried setting remote connection properties?
<connection-factory name="RemoteConnectionFactory"
entries="java:jboss/exported/jms/RemoteConnectionFactory"
connectors="http-connector" use-global-pools="false"
thread-pool-max-size="10"/>
来源:https://stackoverflow.com/questions/35537552/wildfly-10-final-indefinitely-creating-activemq-client-global-threads