title: SQL Error: 17002, SQLState: 08006 IO Error: A connection attempt failed because the connected party did not properly respond after a period of time
body: <p>I have an multithreaded spring application which interacts with database with a set of queries and gives the output. I recently encountered this error and not sure exactly what is its cause. As far as managing the connections on the server, I don't see any issues over there and till now everything was getting executed as expected and I haven't made any recent changes.</p>
  <p>I see After some time things started working as expected, but now I'm curios about this error and the cause of it just to prevent this in future.</p>
  <p>Posting the log trace as below, any help in decoding this will be highly appreciated.</p>
  <pre><code>SQL Error: 17002, SQLState: 08006
  2021-03-11 13:46:28,508 ERROR [org.hibernate.engine.jdbc.spi.SqlExceptionHelper] (default task-59) IO Error: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond
  2021-03-11 13:46:28,548 WARN  [org.jboss.jca.adapters.jdbc.WrappedConnection] (default task-59) IJ030041: Error during closing a statement for: java:jboss/datasources/&lt;pool-name&gt;: java.sql.SQLRecoverableException: Closed Connection
      at oracle.jdbc.driver.PhysicalConnection.needLine(PhysicalConnection.java:3247)
      at oracle.jdbc.driver.OracleStatement.closeOrCache(OracleStatement.java:1392)
      at oracle.jdbc.driver.OracleStatement.close(OracleStatement.java:1375)
      at oracle.jdbc.driver.OracleStatementWrapper.close(OracleStatementWrapper.java:119)
      at oracle.jdbc.driver.OraclePreparedStatementWrapper.close(OraclePreparedStatementWrapper.java:96)
      at org.jboss.jca.adapters.jdbc.WrappedStatement.internalClose(WrappedStatement.java:1491)
      at org.jboss.jca.adapters.jdbc.WrappedConnection.returnConnection(WrappedConnection.java:286)
      at org.jboss.jca.adapters.jdbc.WrappedConnection.close(WrappedConnection.java:256)
      at org.hibernate.engine.jdbc.connections.internal.DatasourceConnectionProviderImpl.closeConnection(DatasourceConnectionProviderImpl.java:144)
      at org.hibernate.internal.AbstractSessionImpl$NonContextualJdbcConnectionAccess.releaseConnection(AbstractSessionImpl.java:391)
      at org.hibernate.engine.jdbc.internal.LogicalConnectionImpl.releaseConnection(LogicalConnectionImpl.java:255)
      at org.hibernate.engine.jdbc.internal.LogicalConnectionImpl.close(LogicalConnectionImpl.java:182)
      at org.hibernate.engine.jdbc.internal.JdbcCoordinatorImpl.close(JdbcCoordinatorImpl.java:205)
      at org.hibernate.engine.transaction.internal.TransactionCoordinatorImpl.close(TransactionCoordinatorImpl.java:297)
      at org.hibernate.internal.SessionImpl.close(SessionImpl.java:369)
  </code></pre>