mysql服务等待应答超时_从mysql备份报错来看net_read_timeout 和net_write_timeout参数
概述
今天mysql備份的crontab自動運行的時候,出現了報警,報警內容如下:
?mysqldump: Error 2013: Lost connection to MySQL server during query when dumping table `fsl_rate_log` at row: 763014下面簡單提供下解決思路和方法。
1、修改max_allow_packet數據庫參數
正常是max_allow_packet影響了,修改為1G后還是一樣
2、查看timeout的值
net_read_timeout :
The number of seconds to wait for more data from a connection before aborting the read. When the server is reading from the client, net_read_timeout is the timeout value controlling when to abort在終止讀之前,從一個連接獲得數據而等待的時間秒數;當服務正在從客戶端讀取數據時,net_read_timeout控制何時超時。
net_write_timeout:
The number of seconds to wait for a block to be written to a connection before aborting the write.When the server is writing to the client, net_write_timeout is the timeout value controlling when to abort。在終止寫之前,等待多少秒把block寫到連接;當服務正在寫數據到客戶端時,net_write_timeout控制何時超時
3、修改timeout參數
set global net_read_timeout = 1200;set global net_write_timeout = 9000;重新測試可正常導出,問題解決
覺得有用的朋友多幫忙轉發哦!后面會分享更多devops和DBA方面的內容,感興趣的朋友可以關注下~
總結
以上是生活随笔為你收集整理的mysql服务等待应答超时_从mysql备份报错来看net_read_timeout 和net_write_timeout参数的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: python rpa库_Automagi
- 下一篇: plsql连接oracle数据库