目前在使用 druid-spring-boot-starter : 1.1.23 版本,最近在日志中发现大量Communications link failure日志,时间间隔不一定,完全找不到规律。
相关配置如下。
spring:
datasource:
druid:
initial-size: 5
min-idle: 10
max-active: 20
max-wait: 60000
time-between-eviction-runs-millis: 60000
max-evictable-idle-time-millis: 7200000
min-evictable-idle-time-millis: 300000
validationQuery: SELECT '1'
testWhileIdle: true
testOnBorrow: true
testOnReturn: true
pool-prepared-statements: true
keep-alive: true
max-open-prepared-statements: 20
async-init: false
web-stat-filter:
enabled: true
url-pattern: /*
exclusions: ".js,.gif,.jpg,.png,.css,.ico,/druid/*"
stat-view-servlet:
enabled: true
allow: "192.168.2.178,127.0.0.1,192.168.1.3,192.168.244.1"
stat:
log-slow-sql: true
slow-sql-millis: 2000
db-type: mysql
merge-sql: true
login-username: test
login-password: 2887
use-global-data-source-stat: true
filters: stat,wall,log4j2
connect-properties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000
url: jdbc:mysql://192.168.244.150:3306/test?useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&serverTimezone=GMT%2B8&allowMultiQueries=true&useSSL=false&autoReconnect=true&failOverReadOnly=false
password: L123456.
username: root
错误消息如下
- org.springframework.dao.RecoverableDataAccessException:
Error querying database. Cause: com.mysql.cj.jdbc.exceptions.CommunicationsException: Communications link failure
The last packet successfully received from the server was 1,503,453 milliseconds ago. The last packet sent successfully to the server was 1,503,455 milliseconds ago.
The error may exist in URL [jar:file:/D:/dev/start/test-0.0.1-SNAPSHOT-exec.jar!/BOOT-INF/lib/zdwl-cloudfinance-dao-0.0.1-SNAPSHOT.jar!/mapper/dispatch/dispath-sqlmap.xml]
The error may involve defaultParameterMap
The error occurred while setting parameters
SQL: SELECT 1
Cause: com.mysql.cj.jdbc.exceptions.CommunicationsException: Communications link failure
The last packet successfully received from the server was 1,503,453 milliseconds ago. The last packet sent successfully to the server was 1,503,455 milliseconds ago.
; Communications link failure
The last packet successfully received from the server was 1,503,453 milliseconds ago. The last packet sent successfully to the server was 1,503,455 milliseconds ago.; nested exception is com.mysql.cj.jdbc.exceptions.CommunicationsException: Communications link failure
The last packet successfully received from the server was 1,503,453 milliseconds ago. The last packet sent successfully to the server was 1,503,455 milliseconds ago.
暂无答案!
目前还没有任何答案,快来回答吧!