Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

HikariPool-1 - Connection marked as broken because of SQLSTATE(08S01), ErrorCode(-99999)

HikariPool-1 - Connection marked as broken because of SQLSTATE(08S01), ErrorCode(-99999)
java.sql.SQLNonTransientConnectionException: Communication link failure. (Read timed out)

I kept getting this problem, when creating a table with data, which was about 6million records. On ACS, an sql developer, it took around 1½ minute.

like image 711
Anders Metnik Avatar asked Feb 21 '19 10:02

Anders Metnik


1 Answers

I found out that default connection validation (spring.datasource.hikari.validationTimeout) was set to 5000 (5 seconds).
This lead to hikari, not being able to validate the connection, because it was busy for long time. Solution was setting this property to a high enough number (i set it to 5minutes - 300000)

like image 176
Anders Metnik Avatar answered Sep 21 '22 09:09

Anders Metnik