Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

经常出现Communications link failure The last packe错误 #5805

Open
SunKaedes opened this issue Mar 27, 2024 · 0 comments
Open

经常出现Communications link failure The last packe错误 #5805

SunKaedes opened this issue Mar 27, 2024 · 0 comments

Comments

@SunKaedes
Copy link

dbtype: mysql
dbversion: 5.7
druid verion: 1.2.22
error info:
Communications link failure The last packet successfully received from the server was 369,104 milliseconds ago. The last packet sent successfully to the server was 16 milliseconds ago.
描述:

  1. 使用的是mysql驱动8.2.0以及druid1.2.20,出现数据库大量sleep以及排队,造成系统无法正常使用,改成mysql驱动5jar以及对应的驱动就好了
  2. 后来看见有Bug升级到了mysql驱动8.3.0以及druid1.2.22,进行压测,mysql会有排队,执行完后立马释放了,并没有按数据库的wait-time设置的时间进行 sleep,wait-time设置的是300
  3. 在2的基础上把mysql驱动8.3.0换成5以及对应的驱动,druid1.2.22不变,mysql会有排队,执行完后没有立马释放,转成了sleep,按wait-time的时间后销毁。
    三种情况,第一种最严重,也可能是我没有设置validationQuery=select 1,但是切换驱动5没加也好了。
    2和3都加了validationQuery=select 1,大部分Communications link failure都是validationQuery的时候触发的,但是会经常出现,druid配置timeBetweenEvictionRunsMillis=60000和minEvictableIdleTimeMillis=300000,wait-time设置的是300。
    总体感觉驱动5的性能比8好。请问应该怎么处理优化。
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant