Java Can not read response from server.Expected to read bytes,read bytes before connection问题解决
问题描述:
Cause: java.sql.SQLException: Can not read response from server. Expected to read 102 bytes, read 99 bytes before connection was unexpectedly lost
问题分析:
1、mysql数据库的等待时长小于项目配置的最大等待时长,导致报错。
show global variables like 'wait_timeout';
解决办法:
(1)数据库等待时长不变,项目的最大等待时长设为28800。
(2)项目的最大等待时长不变,数据库等待时长改为60000。
还没有评论,来说两句吧...