当前位置:   article > 正文

Communications link failure,The last packet successfully received from the server was 244056 millis_communications link failure the last packet succes

communications link failure the last packet successfully received from the s


背景


报错信息:
“success”: false,
“msg”: “同步失败:\n### Error querying database. Cause: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure\n\nThe last packet successfully received from the server was 244,056 milliseconds ago. The last packet sent successfully to the server was 0 milliseconds ago.\n### The error may exist in class path resource [mybatis/mappers/dataCollection/DataCollectionMapper.xml]\n### The error may involve defaultParameterMap\n### The error occurred while setting parameters\n### SQL: select * from ( select t.*,t.table_name_cn as tableNameCn,i2.status as collectionStatus,pt.cron_express,sy.name as systemName from t_data_collection_table t LEFT JOIN (select i.collection_id,MAX(i.id) id from t_log_info i GROUP BY i.collection_id) b ON t.id=b.collection_id LEFT JOIN t_log_info i2 ON b.id=i2.id LEFT JOIN t_prehandle_task pt on pt.id =t.cron_plan_id left join t_datasource td on td.id=t.source_id left join t_source_system sy on sy.id=td.system_id ) as a where 1=1 and a.source_id = ? order by collectionStatus desc ,a.status desc, a.last_collection_time desc,a.id asc\n### Cause: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure\n\nThe last packet successfully received from the server was 244,056 milliseconds ago. The last packet sent successfully to the server was 0 milliseconds ago.\n; Communications link failure\n\nThe last packet successfully received from the server was 244,056 milliseconds ago. The last packet sent successfully to the server was 0 milliseconds ago.; nested exception is com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure\n\nThe last packet successfully received from the server was 244,056 milliseconds ago. The last packet sent successfully to the server was 0 milliseconds ago.”,
“obj”: null,
“errorCode”: -1

说明:简单的方法,修改wait_timeout值。

一、步骤

1.修改/etc/my.cnf配置文件

在/etc/my.cnf里面修改wait_timeout值。
在这里插入图片描述
*注:linux值为1至31536000,可根据实际情况调整。

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/黑客灵魂/article/detail/1014652
推荐阅读
相关标签
  

闽ICP备14008679号