Cause: com.mysql.cj.jdbc.exceptions.CommunicationsException: Communications link failure
The last packet successfully received from the server was 10,016 milliseconds ago.The last packet sent successfully to the server was 19,749 milliseconds ago.; Communications link failure
解决办法:
1.查了一下网络是没有问题的,后来发现是这张表的数据量太大,又是连表查询,查询时间超过了配置的最大等待时间而报错,因此对查询语句进行了优化,满足在最大等待时间内。