I have currently the issue, that my webapp loose database connection and could not reconnect automatically.
I have a postgres database in the background that could be on high load sometimes.
Is there a way to configure the jdbc connection to automatically reconnect?
I have a postgres database in the background that could be on high load sometimes
to automatically reconnect
High load of the database server can not be the reason to “loose connection”. CUBA application uses connection pool in front of the database and re-uses several connections many times. Connection pools do reconnection when necessary.
Which connection pool do you use?
Default tomcat’s connection pool (commons dbcp 2) has a number of options which you can use to quickly recover after connection to database server has been lost and then restored, such as “testOnBorrow”, “removeAbandoned” etc.