[ 
https://issues.apache.org/jira/browse/AMQ-3118?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Timothy Bish closed AMQ-3118.
-----------------------------

    Resolution: Cannot Reproduce

No test case given for this.  Suggest trying against a newer broker and if the 
issue persists create a JUnit test case that demonstrates the problem.
                
> Failover Transport Hot Backup Connections Not Being Closed By Connection Pool 
> When The Primary Connection Is Idle
> -----------------------------------------------------------------------------------------------------------------
>
>                 Key: AMQ-3118
>                 URL: https://issues.apache.org/jira/browse/AMQ-3118
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Connector
>    Affects Versions: 5.3.2
>         Environment: Centos 5.5
> ActiveMQ 5.3.2 producer connecting to ActiveMQ 5.4.2 broker
>            Reporter: Timothy Myer
>
> I am currently using the following URL in my consumer to connect to my AMQ 
> broker:
> failover://(tcp://host1:61616,tcp://host2:61616)?randomize=false&maxReconnectAttempts=2&startupMaxReconnectAttempts=100&initialReconnectDelay=1000&backup=true&timeout=3000
> I have specified the URL parameter backup=true to enable fast failover.
> I am also using the following connection factory configuration from Spring:
> <bean id="feeds-jms-connection-factory" 
> class="org.apache.activemq.pool.XaPooledConnectionFactory"
>   destroy-method="stop">
>   <property name="connectionFactory">
>     <bean class="org.apache.activemq.spring.ActiveMQConnectionFactory">
>       <property name="brokerURL" 
> value="failover://(tcp://host1:61616,tcp://host2:61616)?randomize=false&amp;maxReconnectAttempts=2&amp;startupMaxReconnectAttempts=100&amp;initialReconnectDelay=1000&amp;backup=true&amp;timeout=3000"
>  />
>       <property name="redeliveryPolicy">
>         <bean class="org.apache.activemq.RedeliveryPolicy">
>           <property name="maximumRedeliveries" value="3" />
>           <property name="initialRedeliveryDelay" value="100" />
>         </bean>
>       </property>
>     </bean>
>   </property>
> </bean>
> The problem is this: currently, my producers are not working at a very high 
> load, so my primary connections are in an idle state for more than 30 
> seconds, which means that the connection pool is expiring them.  
> Unfortunately, the pool is not closing the hot backup connections (I can see 
> this through either the JMX console or by running netstat on the producer and 
> broker boxes and seeing a large number of open connections between the 
> producer and broker).  After a few days, the broker is running out of file 
> handles and the broker's CPU is pegged because of all the persistent 
> connections.
> It seems that it should be the responsibility of the Pooled Connection 
> Factory to close any persistent backup connections (or perhaps it should be 
> the responsibility of whichever component creates the hot backup connection 
> in the first place).  In any case, this seems to be a resource leak.
> My only option right now is not to use hot backups and to let those backup 
> connections be created dynamically.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to