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

1

21
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.

Sergent answered 21/2, 2019 at 10:2 Comment(0)
S
36

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)

Sergent answered 21/2, 2019 at 10:2 Comment(3)
Thanks alot, it took 30 mins to resolve. At last got your solution, it helped me.Lands
Complementing the answer, in order to do what @Anders suggested you just need to add this key spring.datasource.hikari.validationTimeout=300000 to your application properties fileAbnegate
Simple and precise answer. Thanks manForsworn

© 2022 - 2024 — McMap. All rights reserved.