【详述】使用druid 驱动连接StarRocks异常
【业务影响】
【StarRocks版本】2.5.12
【集群规模】3fe + 5be
业务端报错:
Communications link failure The last packet successfully received from the server was 334 milliseconds ago. The last packet sent successfully to the server was 330 milliseconds ago.; nested exception is com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure The last packet successfully received from the server was 334 milliseconds ago. The last packet sent successfully to the server was 330 milliseconds ago.
The last packet successfully received from the server was 334 milliseconds ago. The last packet sent successfully to the server was 330 milliseconds ago.] with root cause
java.io.EOFException: Can not read response from server. Expected to read 4 bytes, read 0 bytes before connection was unexpectedly lost.
数据库连接池配置:
db:
datasource:
doris:
url: jdbc:mysql://xxx:3306/{database}?useUnicode=true&characterEncoding=utf-8&autoReconnect=true&autoReconnectForPools=true
username: {username}
password: {password}
driver-class-name: com.mysql.jdbc.Driver
maximum-pool-size: 500
max-idle: 10
max-wait: 10000
min-idle: 5
initial-size: 5
validation-query: SELECT 1
test-on-borrow: true
test-while-idle: true
time-between-eviction-runs-millis: 30000