You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Justin Bertram <jb...@apache.org> on 2021/08/23 16:29:01 UTC

Re: Artemis does not reconnect to MySQL after connection timeout

For what it's worth, this situation should be vastly improved since 2.16.0
where dbcp2 was incorporated for connection management. See ARTEMIS-2823
[1] for more details.


Justin

[1] https://issues.apache.org/jira/browse/ARTEMIS-2823


On Wed, Apr 22, 2020 at 9:45 AM ChrisSu <su...@hotmail.com> wrote:

> I exactly have the same problem like mk666aim! Is there any solution for
> this? Compare this stackoverflow thread:
>
> https://stackoverflow.com/questions/60884155/activemq-artemis-jdbc-store-add-connection-pool-for-db-connections
>
> Currently I send keep alive messages to my queues to keep alive the brokers
> db connection to the database.
>
> ANswers to your questions:
>
> 1) MySQL terminates connections without traffic after 8h.
> 2) This is not a solution
> 3) An MySQL connection is thrown, and caught by the brokers general
> exception handlern. This restarts the whole messagebroker and disconnects
> all clients.
> 4) As i understand, it's currently not (or no longer) possible to configure
> a javax.sql.DataSource which is handled by any connection pool (hikaro,
> c3po, ...). Obviously this was possible before via spring xml config.
> 5) Even if autoReconnect is set to true, the MySQL driver thows an
> exception
> which causes the messagebroker to restart.
>
>
>
>
> --
> Sent from:
> http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html
>
>