Thread: autoReconnect with PostGres

autoReconnect with PostGres

From
Ranjan Kumar Baisak
Date:
Hello Group,
                      I am using postgres in my web application. Number
of physical DB connections are just getting increased for each
re-deployment of my web application. I generally dont shutdown my
webserver and only re-deploy my web application. I heard that
"autoReconnect = true" reuses idle connections for each redeployments. I
am not sure whether this can help me to make physical DB connections
constant.
My configuration parameters:

 <Resource
       name="jdbc/XXXX"
       scope="Shareable"
       type="javax.sql.DataSource"
       url="jdbc:postgresql://mydb.test.com/micms"
       validationQuery="select tablename from pg_tables where schemaname
= 'gpdb'"
       maxIdle="10"
       maxActive="20"
       maxWait="-1"
       driverClassName="org.postgresql.Driver"
       removeAbandoned="true"
       username="xxxx"
       logAbandoned="true"
       removeAbandonedTimeout="120"
       password="xxxx" />


Your help would be highly appreciated.

regards,
Ranjan