ActiveMQ 5.6 Connection Pool Memory Leak Issue
Recently, while using ActiveMQ’s connection pool, I discovered a very serious memory leak issue.
Through jmap monitoring, it can be seen that java.util.concurrent.locks.ReentrantLock and org.apache.activemq.pool.PooledConnection occupy a very large amount of memory, and the growth rate is also very fast.
After searching online, I found exactly the corresponding ActiveMQ bug report: https://issues.apache.org/jira/browse/AMQ-3997
This bug has been fixed in version 5.7, so it can be resolved by upgrading the version.
At the same time, there is another solution, which is to use Spring’s connection pool to replace ActiveMQ’s built-in connection pool. The configuration is as follows:
1 | <bean id="jmsConnectionFactory" |
All articles on this blog are licensed under CC BY-NC-SA 4.0 unless otherwise stated.
Comments
