brettwooldridge / HikariCP

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

stream error #553

Closed ghost closed 8 years ago

ghost commented 8 years ago

Connection org.mariadb.jdbc.MySQLConnection@5aa2b592 failed alive test with exception Could not read resultset: unexpected end of stream, read 0 bytes from 4

version: 2.4.1

pool.connectionTimeout=3000 pool.validationTimeout=1000 pool.idleTimeout=90000 pool.maxLifetime=123000 pool.minimumIdle=400 pool.initializationFailFast=false mvn.pool.leakDetectionThreshold=10000

nitincchauhan commented 8 years ago

minimumIdle value looks suspicious. probably mysql or the machine is not capable/configured to handle such load. If you missed, https://github.com/brettwooldridge/HikariCP/wiki/About-Pool-Sizing may help you decide pool size. Please also upgrade to release 2.4.3 EDIT: check and if required set "wait_time" in mysql to minute or two more than maxLifetime

brettwooldridge commented 8 years ago

Agreed. Unless you have 200+ CPU cores, 400 connections is insane. This error looks like an out of memory error in MySQL. Either way, the origin of this error is not HikariCP.

ghost commented 8 years ago

OK

ghost commented 8 years ago

Our use case is not OLTP and normal scenario. My application needs more connections to kill query of OLTP , that slow-query.

Agreed. Unless you have 200+ CPU cores, 400 connections is insane.

ghost commented 8 years ago

timeout

EDIT: check and if required set "wait_time" in mysql to minute or two more than maxLifetime

ghost commented 8 years ago

@brettwooldridge
idleTimeout > maxLifetime is right ? or idleTimeout < maxLifetime is right ?

brettwooldridge commented 8 years ago

idleTimeout should be less than maxLifetime.

ghost commented 8 years ago

@brettwooldridge Thanks