activemq-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Timothy Bish (JIRA)" <>
Subject [jira] [Commented] (AMQ-6612) PooledConnectionFactory's expired connections are still assignable for new session.
Date Tue, 23 May 2017 15:40:04 GMT


Timothy Bish commented on AMQ-6612:

The issue here is that there are still references to the expired connection and so not handing
them out implies that you allow the pool of active connections to grow beyond the configured
max connections in order to have the ability to create a new connection to service the request
when the connections in the pool have reached their expiration value but are still in use.

> PooledConnectionFactory's expired connections are still assignable for new session.
> -----------------------------------------------------------------------------------
>                 Key: AMQ-6612
>                 URL:
>             Project: ActiveMQ
>          Issue Type: Bug
>    Affects Versions: 5.11.0
>            Reporter: Raphiki
> Since a couple of week we tried to tune our JMS connections established from Apache Camel
to ActiveMQ.
> We're using *org.apache.activemq.pool.PooledConnectionFactory* as ConnectionFactory and
the *expiryTimeout* parameter does not work as expected. On my testing environment I've 30
consumer on 15 connection and 200 maximumActiveSessionPerConnection set. The problem is that
I rarely see any reconnection (I use a HAProxy to log TCP reconnection). Furthermore these
rarely reconnection appends much more after the expiryTimeout I configure (10, 100 times more)
and when I restart my server I can observe some connections which have never been released.
> However if I define 1 or less connection per consumer I observe expected reconnection,
but I don't think it makes any sense with sharing connection pattern...
> I explore activemq-jms-pool's code and found that the [connectionPool.borrow() method|]
just call the expiryCheck() throught the [validateObject()|]
method but it considers the connection valid (and so reusable) if it has expired but has still
some remaining reference...
> So I think the problem's explanation is that my connection is continually in use, so
even if it is expired the connection is considered as valid and is reusable, and is assigned
for new session and stay continually in use and so one...
> Should these expired connections not be borrowed anymore when expired ? (but do not destroy
them otherwise you will repoen AMQ-4366!).

This message was sent by Atlassian JIRA

View raw message