brettwooldridge / HikariCP

光 HikariCP・A solid, high-performance, JDBC connection pool at last.
Apache License 2.0
19.91k stars 2.92k forks source link

From c3p0 to HikariCP: connection error #2206

Open jeans11 opened 3 months ago

jeans11 commented 3 months ago

Hi guys!

I have a very weird behaviour since I moved from c3p0 to Hikari. On a specific service with one instance (2cpu/4gb) sometimes I have the error:

Communications link failure
The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.

With c3p0, I don't have this kind of error.

This error happen frequently when I deploy a new version of my service. When the new instance start and try to create a connection.

I already see the HikaryCP FAQ of this subject but that has not solve this issue.

Currently this is the following override I made on the HkariCP configuration:

The service is not exposed to the end user. It's a worker that process some jobs at regular time.

IRus commented 1 month ago

@jeans11 this is an old MySQL issue, that not related to HikariCP directly, probably you updated something else while migrating. There are plenty of answers on the web: https://stackoverflow.com/questions/6865538/solving-a-communications-link-failure-with-jdbc-and-mysql