The last packet successfully received from the server was 39,900 milliseconds ago問題解決


1,之前用Mysql或者mycat的時候都沒有這個問題。后來改為haproxy+keepalived+mycat后出現這個問題

 

2,網上查了很多說法,我按照網上說的改了

 

 

datasource:
url: jdbc:mysql://192.168.0.206:8067/NOVADB?useUnicode=true&characterEncoding=utf8&serverTimezone=CTT&autoReconnect=true&failOverReadOnly=false
username: root
password: 123456
driver-class-name: com.mysql.jdbc.Driver
# 使用druid數據源
type: com.alibaba.druid.pool.DruidDataSource
druid:
validationQuery: select 1
testWhileIdle: true
testOnBorrow: true
testOnReturn: true

 

 

發現還是不行,后來發現修改haproxy的配置

 vim /usr/local/haproxy/haproxy.cfg

后來發現把haproxy的timeout server 120000    改大比如120 秒 

 

20190628

后來發現haproxy中幾個 參數都要改成120000 才行(具體哪個生效不知道,后續再研究)

並且task的service還是有報錯因為沒有配置

plan配置了就沒有這個報錯了

 

 

spring:
profiles: prd
application:
name: novaplanserv
datasource:
url: jdbc:mysql://192.168.0.206:8067/NOVADB?useUnicode=true&characterEncoding=utf8&serverTimezone=CTT&autoReconnect=true&failOverReadOnly=false
username: root
password: 123456
driver-class-name: com.mysql.jdbc.Driver
# 使用druid數據源
type: com.alibaba.druid.pool.DruidDataSource
druid:
validationQuery: select 1
testWhileIdle: true
testOnBorrow: true
testOnReturn: true

后來發現


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM