<?xml version="1.0" encoding="UTF-8"?>

<Context>
    <Resource
            auth="Container"
            type="javax.sql.DataSource"
            driverClassName="org.postgresql.Driver"
            factory="org.apache.tomcat.jdbc.pool.DataSourceFactory"
            url="${geodesy-db-url}"
            description="Distribution Datasource"
            username="${geodesy-db-username}"
            password="${geodesy-db-password}"
            name="jdbc/GeodesyDB"
            maxActive="40"
            maxWait="10000"
            removeAbandoned="true" 
            removeAbandonedTimeout="120" 
            testOnBorrow="true"
            testOnReturn="false" 
            testWhileIdle="true"
            timeBetweenEvictionRunsMillis="5000" 
            validationInterval="30000" 
            validationQuery="SELECT 1" />
</Context>

<?xml version="1.0" encoding="UTF-8"?>

<Context>
    <Resource
            auth="Container"
            type="javax.sql.DataSource"
            driverClassName="org.postgresql.Driver"
            factory="org.apache.tomcat.jdbc.pool.DataSourceFactory"
            url="${geodesy-db-url}"
            description="Distribution Datasource"
            username="${geodesy-db-username}"
            password="${geodesy-db-password}"
            name="jdbc/GeodesyDB"
            maxActive="40"
            maxWait="10000"
            removeAbandoned="true" 
            removeAbandonedTimeout="600" 
            testOnBorrow="true"
            testOnReturn="false" 
            testWhileIdle="true"
            timeBetweenEvictionRunsMillis="5000" 
            validationInterval="30000" 
            validationQuery="SELECT 1" />
</Context>

Increase tomcat's db connection timeout
Increase tomcat's db connection timeout
