免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 18124 | 回复: 6
打印 上一主题 下一主题

【讨论中】Lost connection to MySQL server during query ( server_errno=2013) [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2013-03-27 10:15 |只看该作者 |倒序浏览
本帖最后由 chinafenghao 于 2013-09-02 09:54 编辑

线上slave机器大量报这个2013错误,每天一条,网上查了下别人说的这种错误:一般因网络问题导致的可能性比较大,另外,反向解析 和max_allowed_packet 不一致也可能会导致这种问题。
Mysql的Error.log 中记录的Error 2013貌似是个很奇怪的错误,它并不影响复制本身,虽然error log中有大量的这类错误记录,我们检查了,发现并没有造成 Master ,Slave 数据不一致的情况。
但这个怎感觉很烦人,也没有找到合适的解决办法,

这个帖子也说道类似的情况,http://bugs.mysql.com/bug.php?id=5588,但是我感觉也没说的很透彻,

有没有兄弟也报类似的错误,或者类似的情况,你们是怎么解决的,怎么理解的?

论坛徽章:
0
2 [报告]
发表于 2013-03-27 10:16 |只看该作者
附部分错误:
130204  5:00:02 [ERROR] Error reading packet from server: Lost connection to MySQL server during query ( server_errno=2013)
130204  5:00:02 [Note] Slave I/O thread exiting, read up to log 'chcp-cnc-db01-bin.000099', position 420402
130204  5:00:03 [Note] Slave I/O thread: connected to master 'cy_repl@10.182.0.14:3306',replication started in log 'chcp-cnc-db01-bin.000099' at position 420402
130205  5:00:01 [ERROR] Error reading packet from server: Lost connection to MySQL server during query ( server_errno=2013)
130205  5:00:01 [Note] Slave I/O thread exiting, read up to log 'chcp-cnc-db01-bin.000102', position 2133703
130205  5:00:03 [Note] Slave I/O thread: connected to master 'cy_repl@10.182.0.14:3306',replication started in log 'chcp-cnc-db01-bin.000102' at position 2133703
130206  5:00:01 [ERROR] Error reading packet from server: Lost connection to MySQL server during query ( server_errno=2013)
130206  5:00:01 [Note] Slave I/O thread exiting, read up to log 'chcp-cnc-db01-bin.000102', position 3077466
130206  5:00:03 [Note] Slave I/O thread: connected to master 'cy_repl@10.182.0.14:3306',replication started in log 'chcp-cnc-db01-bin.000102' at position 3077466
130207  5:00:01 [ERROR] Error reading packet from server: Lost connection to MySQL server during query ( server_errno=2013)
130207  5:00:01 [Note] Slave I/O thread exiting, read up to log 'chcp-cnc-db01-bin.000102', position 4313793
130207  5:00:03 [Note] Slave I/O thread: connected to master 'cy_repl@10.182.0.14:3306',replication started in log 'chcp-cnc-db01-bin.000102' at position 4313793
130208  5:00:01 [ERROR] Error reading packet from server: Lost connection to MySQL server during query ( server_errno=2013)
130208  5:00:01 [Note] Slave I/O thread exiting, read up to log 'chcp-cnc-db01-bin.000102', position 5715859
130208  5:00:03 [Note] Slave I/O thread: connected to master 'cy_repl@10.182.0.14:3306',replication started in log 'chcp-cnc-db01-bin.000102' at position 5715859
130209  5:00:01 [ERROR] Error reading packet from server: Lost connection to MySQL server during query ( server_errno=2013)
130209  5:00:01 [Note] Slave I/O thread exiting, read up to log 'chcp-cnc-db01-bin.000102', position 7117936
130209  5:00:03 [Note] Slave I/O thread: connected to master 'cy_repl@10.182.0.14:3306',replication started in log 'chcp-cnc-db01-bin.000102' at position 7117936
130210  5:00:01 [ERROR] Error reading packet from server: Lost connection to MySQL server during query ( server_errno=2013)
130210  5:00:01 [Note] Slave I/O thread exiting, read up to log 'chcp-cnc-db01-bin.000102', position 8520313
130210  5:00:03 [Note] Slave I/O thread: connected to master 'cy_repl@10.182.0.14:3306',replication started in log 'chcp-cnc-db01-bin.000102' at position 8520313
130211  5:00:01 [ERROR] Error reading packet from server: Lost connection to MySQL server during query ( server_errno=2013)
130211  5:00:01 [Note] Slave I/O thread exiting, read up to log 'chcp-cnc-db01-bin.000102', position 9922373
130211  5:00:03 [Note] Slave I/O thread: connected to master 'cy_repl@10.182.0.14:3306',replication started in log 'chcp-cnc-db01-bin.000102' at position 9922373
130212  5:00:01 [ERROR] Error reading packet from server: Lost connection to MySQL server during query ( server_errno=2013)
130212  5:00:01 [Note] Slave I/O thread exiting, read up to log 'chcp-cnc-db01-bin.000103', position 838611
130212  5:00:03 [Note] Slave I/O thread: connected to master 'cy_repl@10.182.0.14:3306',replication started in log 'chcp-cnc-db01-bin.000103' at position 838611

论坛徽章:
0
3 [报告]
发表于 2013-03-27 10:17 |只看该作者
这篇帖子也说到类似的问题:
http://www.itpub.net/thread-1506684-1-1.html

论坛徽章:
0
4 [报告]
发表于 2013-09-02 09:15 |只看该作者
我最近也遇到相同的错误,不知道楼主是如何解决的呢?


   

论坛徽章:
8
CU大牛徽章
日期:2013-09-18 15:20:48CU大牛徽章
日期:2013-09-18 15:20:58CU大牛徽章
日期:2013-09-18 15:21:06CU大牛徽章
日期:2013-09-18 15:21:12CU大牛徽章
日期:2013-09-18 15:21:17天秤座
日期:2013-10-30 14:01:03摩羯座
日期:2013-11-29 18:02:31luobin
日期:2016-06-17 17:46:36
5 [报告]
发表于 2013-09-02 09:54 |只看该作者
@hsu_wp
楼主,你发现没有。
1、你每天出错的时间几乎一样。这里确定是某个固定因素触发的,比如计划任务。
2、这个错误一般都是网络问题引发的。

所以你可以考虑排查这两台机器每天5点的固定操作,5点时候数据库服务器的各项性能指标等,找出什么原因导致网络异常,最后影响到slave的报错。,

论坛徽章:
0
6 [报告]
发表于 2014-08-10 23:30 |只看该作者
我和master-master的也有类似的问题,但是replication又是好的,贴一下错误,这里:
master:3306
140808 14:08:06 [ERROR] Slave I/O: error reconnecting to master 'repli@slave:3306' - retry-time: 60  retries: 86400, Error_code: 2003
140808 14:20:31 [ERROR] Error reading packet from server: Lost connection to MySQL server during query ( server_errno=2013)
slave:3306
140808 14:08:06 [ERROR] Error reading packet from server: Lost connection to MySQL server during query ( server_errno=2013)
140808 14:20:31 [ERROR] Slave I/O: error reconnecting to master 'repli@master:3306' - retry-time: 60  retries: 86400, Error_code: 2003
话说是个bug

论坛徽章:
1
IT运维版块每日发帖之星
日期:2015-08-30 06:20:00
7 [报告]
发表于 2015-08-31 10:50 |只看该作者
我使用innobackupex备份slave时,今天遇到过一次。。
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP