Four Stars

ActiveMQ broker crashes complaining about max connections

We have configured a Master-Slave pair of brokers and the master recently failed after about an hour of this message showing up in the logs:


2017-06-20 11:00:20,794 | ERROR | Could not accept connection  : org.apache.activemq.transport.tcp.ExceededMaximumConnectionsException: Exceeded the maximum number of allowed client connections. See the 'maximumConnections' property on the TCP transport configuration URI in the ActiveMQ configuration file (e.g., activemq.xml) | | ActiveMQ Transport Server Thread Handler: tcp://


I am not sure why this should be, since we do not have nearly enough producers and consumers running in this environment to reach 1000 connections. We discovered the issue when Amazon's CloudWatch warned us that the host was reaching its RAM limit. A few minutes later the ActiveMQ process died.


This is on an EC2 instance with 1GB of RAM and the ActiveMQ JVM (the only thing really running on the host) shouldn't go above 512MB. The memory options are -Xms512M -Xmx512M. After the failover, I've been watching the second host and, as expected, the number of active connections reported over JMX never goes over 10. So if my maximum is set to 1000, how can it run out? If a rogue process did open 990 connections, would I run out of RAM first?

Relevant snippets from the activemq.xml:


                    <memoryUsage percentOfJvmHeap="70" />
                    <storeUsage limit="5 gb"/>
                    <tempUsage limit="512 mb"/>


<transportConnector name="openwire" uri="tcp://"/>

I was hoping the problem was my ActiveMQ configuration. But searching around on Google, I find people running into this error because their client applications hand-coded in Java are doing something wrong. Since my clients are Talend jobs, I am not sure how to proceed troubleshooting.

  • Data Integration
  • ESB

Re: ActiveMQ broker crashes complaining about max connections


We have redirected your issue to talend experts and then come back to you as soon as we can.

Best regards


Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.