3
votes

2019-08-01 06:04:43,263 | 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) | org.apache.activemq.broker.TransportConnector | ActiveMQ Transport Server Thread Handler: nio+ssl://b-e13f27f2-1fa3-419f-819c-a24277e973a8-2.mq.us-west-2.amazonaws.com:61617?maximumConnections=100&wireFormat.maxFrameSize=104857600

Getting above exception on amazonMQ, earlier we were using activeMQ where we were setting something like

<transportConnectors>
        <!-- DOS protection, limit concurrent connections to 1000 and frame size to 100MB -->
        <transportConnector name="openwire" uri="tcp://0.0.0.0:61616?maximumConnections=1000&amp;wireformat.maxFrameSize=104857600"/>
    </transportConnectors>

In amazonMQ we are unable to find such options and broker is throwing exception. We did checked transportConnector on amazonMQ supports :

  1. name
  2. updateClusterClients
  3. rebalanceClusterClients
  4. updateClusterClientsOnRemove

Any idea how can we increase size of maximum connections?

2

2 Answers

1
votes

As listed here that limit can be changed per AWS account.

You will need to open up an AWS support ticket requesting a limit increase

0
votes

I guess I have to ask, Why so many connections?

Large has 1000 connections with Micro allowing 100 connections. Seeing in your error message you have 100 connections, are you on Micro? Maybe a Micro instance can't handle the load?

Are the producers/consumers something you control or is this a third party app? I would review code before increasing these levels if that is something you can do. Connections are to be shared as much as they can be. Are they being closed correctly when done? Are all your producers opening and maintaining their own connections?

Producer Connections should be grouped and shared with the PooledConnectionFactory.