Tomcat not reconnecting PostgreSQL JDBC pools on DB restart
<p>Recently we had to restart our database server (yes, a production one), and one of the Tomcats didn't reconnect to the JNDI resources.</p>

<p>This is our JNDI resource definition:</p>

<pre><code>&lt;Resource name="jdbc/postgres" auth="Container"
          type="javax.sql.DataSource"
          driverClassName="org.postgresql.Driver"
          url="jdbc:postgresql://10.1.0.104:5432/db"
          username="******" password="*****"
          maxTotal="30" maxIdle="5" maxWaitMillis="10000"
          logAbandoned="true" removeAbandonedOnBorrow="true"
          removeAbandonedOnMaintenance="true"
          factory="org.apache.tomcat.jdbc.pool.DataSourceFactory"
          validationQueryTimeout="5" validationQuery="select 1"
          testOnBorrow="true" /&gt;
</code></pre>

<p>Software versions:</p>

<ul>
<li>Debian GNU/Linux 8.2 (jessie)</li>
<li>Apache Tomcat/8.0.14 </li>
<li>OpenJDK 1.7.0_91-b02</li>
<li>PostgreSQL 9.4.5 on x86_64-unknown-linux-gnu, compiled by gcc (Debian 4.9.2-10) 4.9.2, 64-bit</li>
</ul>

<p>What could be wrong? Why it didn't reconnect automatically?</p>

<p>PS: This maybe is a cross forum question dba vs stackoverflow, but as it involves both side don't know actually where to ask it.</p>