米狗

  • kubernets
  • docker
  • AWS
  • linux
  • nginx
Kratos
  1. 首页
  2. 数据库
  3. mysql
  4. 正文

using the Connector/J connection property 'autoReconnect=true' to avoid this problem

2022年9月5日 544点热度 0人点赞 0条评论

程序页面查看报错异常,具体如下:

Cause: com.mysql.cj.jdbc.exceptions.CommunicationsException: The last packet successfully received from the server was 426,962,099 milliseconds ago. The last packet sent successfully to the server was 426,962,100 milliseconds ago. is longer than the server configured value of 'wait_timeout'. You should consider either expiring and/or testing connection validity before use in your application, increasing the server configured values for client timeouts, or using the Connector/J connection property 'autoReconnect=true' to avoid this problem.;
————————————————

在文件最后添加autoReconnect=true,多个参数之间使用&连接。

jdbc.url = jdbc:mysql://{yourIpAddress}:3306/o2o?useUnicode=true&autoReconnect=true

 

具体如下:

"url": "jdbc:mysql://mysql5.t.demo.com:3306/gateway?useSSL=false&useUnicode=true&characterEncoding=utf-8&autoReconnect=true"

 

标签: 暂无
最后更新:2022年9月5日

duhongjun

这个人很懒,什么都没留下

点赞
< 上一篇

归档

  • 2024 年 10 月
  • 2024 年 4 月
  • 2024 年 3 月
  • 2024 年 2 月
  • 2024 年 1 月
  • 2023 年 11 月
  • 2023 年 4 月
  • 2023 年 2 月
  • 2023 年 1 月
  • 2022 年 11 月
  • 2022 年 10 月
  • 2022 年 9 月
  • 2022 年 8 月
  • 2021 年 12 月
  • 2021 年 11 月
  • 2021 年 8 月
  • 2021 年 7 月
  • 2021 年 6 月
  • 2021 年 2 月
  • 2020 年 1 月
  • 2019 年 12 月
  • 2019 年 11 月
  • 2019 年 10 月
  • 2019 年 9 月
  • 2019 年 8 月

分类目录

  • AWS
  • docker
  • elasticsearch
  • Jenkins
  • kubernets
  • linux
  • mysql
  • nginx
  • Oracle
  • php
  • redis
  • zabbix
  • 个人
  • 中间件
  • 公有云
  • 大数据
  • 安全工具
  • 微软
  • 操作系统
  • 数据库
  • 未分类
  • 监控
  • 科技
  • 网络技术
  • 资讯
  • 阿里云

COPYRIGHT © 2024 米狗. ALL RIGHTS RESERVED.

Theme Kratos Made By Seaton Jiang

沪ICP备2021019346号-1