[Warning] Aborted connection 11203 to db: 'ide' user: 'nuc' host: 'prd01.mb.com' (Got an error writi
PS:一台物理机扯分了3个虚拟机,一个主db,一个主备,一个从备。
切换到0301的时候
Sep 6 09:16:16 prddb0301 mysqld: 130906 9:16:16 [Warning] Aborted connection 11203 to db: 'ide' user: 'nuc' host: 'prd01.mb.com' (Got an error writing communication packets)
Sep 6 09:16:16 prddb0301 mysqld: 130906 9:16:16 [Warning] Aborted connection 12498 to db: 'ide' user: 'nuc' host: 'prd02.mb.com' (Got an error writing communication packets)
Sep 6 09:16:16 prddb0301 mysqld: 130906 9:16:16 [Warning] Aborted connection 13503 to db: 'ide' user: 'nuc' host: 'prd03.mb.com' (Got an error writing communication packets)
Sep 6 09:16:17 prddb0301 mysqld: 130906 9:16:17 [Warning] Aborted connection 6681 to db: 'ide' user: 'nuc' host: 'prd11.mb.com' (Got an error writing communication packets)
Sep 6 09:16:18 prddb0301 mysqld: 130906 9:16:18 [Warning] Aborted connection 15070 to db: 'ide' user: 'nuc' host: 'prd12.mb.com' (Got an error writing communication packets)
刚才切换到0301的时候,connection 1800的时候,后台error报错。
大概原因:shard卡住会让app server都卡住,最差情况下,所以即使一个shard可能影响也挺大,比较担心。
1 check 用show engine innodb status\G;进行分析
看到:所有的thread都在d estimating records in index range;有很多类似的很多的SQL等待:
select ENTITLEMENT_ID, USER_ID, PRODUCT_ID, GRANT_DATE, EXPIRATION_DATE, DATE_CREATED, STATUS, CREATED_BY, MODIFIED_BY, DATE_MODIFIED, STATUS_REASON_CODE, ENTITLEMENT_TAG, VERSION, PRODUCT_CA
TALOG, USE_COUNT, GROUP_ID, ENTITLEMENT_SOURCE, ENTITLEMENT_TYPE, PROJECT_ID, DEVICE_ID, MANAGED_LIFECYCLE, CONSUMABLE, ORIGIN_PERMISSIONS, EXTERNAL_TYPE, EXTERNAL_ID from ide.entil
T as ent where 1 = 1 and STATUS = 1 and USER_ID = 2331523206069 and DATE_MODIFIED >= '2013-09-06 01:39:00' order by ENTITLEMENT_ID DESC limit 0, 5000
我觉得还是内存问题,把hugepage 拿掉,现在的行为就是机器不繁忙但所有的资源都消耗在iowait上,导致卡死,刚才我们改动过的就是内存。
http://www.51testing.com/?uid-225738-action-viewspace-itemid-235472
2 check memory
[ed@prdkvm35 ~]$ free -g
total used free shared buffers cached
Mem: 125 124 1 0 1 0
-/+ buffers/cache: 122 3
看到物理机器上面一共3G内存,把物理机器上面的vm内存再弄小点,给物理机器的内存设置大一些。修改完后,重启动vm,然后启动Mysql,并且failover writer 从0302到0301上面。
3 failover之后,connection过多
failover过后,看到0301的db上面的conntion client猛增到2000多个,超过正常范围值500多4倍了,而且client还在不停的增长,马上failover writer 0301db到0302db,connection恢复正常了。
4 check,检查0301的my.cnf配置文件
将login audit去掉,然后改小innodb_buffer_pool_size,从60G改称48G。再进行failover writer 从0302到0301上面。
5 check again
failover还是暴增到2000多个,超过正常范围值500多4倍了,而且client还在不停的增长,马上failover writer 0301db到0302db,connection恢复正常了。
6 内存再设置小一些,
把主备vm和从备vm的内存再设置小一些,每个去掉4G,修改完后,再次重启vm以及vm上面的MySQL服务。再failover writer 从0302到0301上面。check之后发现conntions还是t猛增到2000多个,超过正常范围值500多4倍了。而且IO wait好高啊!然后failover回去到db0302 ,failover writer 从0302到0301上面。
7 每次IO好高,那么去看看my.cnf里面的innodb_flush_log_at_trx_commit之类innodb writer的参数是否合理。
发现my.cnf里面innodb_flush_log_at_trx_commit = 1; God,貌似找到问题所在了,马上修改my.cnf 将innodb_flush_log_at_trx_commit = 0;
ok,然后再failover writer 从0302到0301上面,check conntion clients,猛增到800多后稳定下来1分钟后,connection clients稳定在500左右。OK,成了!
PS:这个prod上面的my.cnf是原来的DBA设置的,在每次failover的时候,都需要保持 Seconds_Behind_Master=0;
追得太慢NOC又call我了,看到sync_binlog=1 了,我改成0了,这样很快Seconds_Behind_Master=0了。
[Warning] Aborted connection 11203 to db: 'ide' user: 'nuc' host: 'prd01.mb.com' (Got an error writi的更多相关文章
- Aborted connection 1055898 to db: 'xxx' user: 'yyy' host: 'xxx.xxx.xxx.xxx' (Got timeout reading communication packets)
mysql错误日志中,发现大量以下类似信息:(mysql 5.7.18) [Note] Aborted connection 1055898 to db: 'xxx' user: 'yyy' host ...
- 关于Aborted connection告警日志的分析
前言: 有时候,连接MySQL的会话经常会异常退出,错误日志里会看到"Got an error reading communication packets"类型的告警.本篇文章我们 ...
- Mac 下locate命令使用问题WARNING: The locate database (/var/db/locate.database) does not exist.
想在Mac下使用locate时,提醒数据库没创建: WARNING: The locate database (/var/db/locate.database) does not exist. To ...
- WARNING: inbound connection timed out (ORA-3136)
WARNING: inbound connection timed out (ORA-3136) WARNING: inbound connection timed out (ORA-3136) Ta ...
- input01.sh: line 11: warning: here-document at line 4 delimited by end-of-file (wanted `EOF') input01.sh: line 12: syntax error: unexpected end of file
写了个脚本用cat>>EOF报错如下: input01.sh: line 11: warning: here-document at line 4 delimited by end-of- ...
- An existing connection was forcibly closed by the remote host
StackOverflow https://stackoverflow.com/questions/5420656/unable-to-read-data-from-the-transport-con ...
- Database mirroring connection error 4 'An error occurred while receiving data: '10054(An existing connection was forcibly closed by the remote host.)
公司一SQL Server镜像发生了故障转移(主备切换),检查SQL Server镜像发生主备切换的原因,在错误日志中发现下面错误: Date 2019/8/31 14:09:17 ...
- Invalid connection string format, a valid format is: "host:port:sid"
报错信息: Caused by: java.sql.SQLException: Io 异常: Invalid connection string format, a valid format is: ...
- Start Failed, Internal error: recovering IDE to the working state after the critical startup error
Start Failed, Internal error: recovering IDE to the working state after the critical startup error F ...
随机推荐
- for循环语句之求和,阶乘,求偶,求n次篮球蹦起高度
for循环语句格式: ;;/*循环条件*/i++/*状态改变*/) { //循环体,执行代码:(break;跳出循环体) } for 穷举法用循环把各种可能的情况都走一遍,然后用if条件把满足要求的结 ...
- 静态化 - 伪静态技术(PHP正则表达式实现)
效果: 代码: <?php // + —— —— —— —— —— —— —— —— —— —— —— —— —— —— —— —— —— —— —— —— —— —— // + 正则表达式,实 ...
- [GDUT 决赛]--GCD,LCM——我是好人(数论)
Description 众所周知,我是好人!所以不会出太难的题,题意很简单 给你两个数n和m,问你有多少对正整数对最大公约数是n,最小公倍数是m最后友情提供解题代码(我真是太好人了) void sol ...
- [Swust OJ 585]--倒金字塔(LIS最长不下降子序列)
题目链接:http://acm.swust.edu.cn/problem/585/ Time limit(ms): 3000 Memory limit(kb): 65535 SWUST国的一支科学 ...
- BZOJ 1977: [BeiJing2010组队]次小生成树 Tree( MST + 树链剖分 + RMQ )
做一次MST, 枚举不在最小生成树上的每一条边(u,v), 然后加上这条边, 删掉(u,v)上的最大边(或严格次大边), 更新答案. 树链剖分然后ST维护最大值和严格次大值..倍增也是可以的... - ...
- IDEA 中使用Maven Compile 找不到本地 Jar
本文地址:http://www.cnblogs.com/duwei/p/4656410.html 在IDEA 的子 Maven Module 中使用 compile 进行编译, 一开始提示从私有远程仓 ...
- [转]Centos6.5安装配置keepalived
参考博文: Centos6.5安装配置keepalived CentOS6.5 keepalived详解及实现Nginx服务的高可用性 CentOS6.5 LVS + KeepAlived搭建步骤 我 ...
- 【 D3.js 入门系列 — 1 】 第一个程序 HelloWorld
记得以前刚上大一学 C 语言的时候,写的第一个程序就是在控制台上输出 HelloWorld .当时很纳闷,为什么要输出这个.老师解释说所有学编程入门的第一个程序都是在屏幕上输出 HelloWorld, ...
- 浙江大学2015年校赛F题 ZOJ 3865 Superbot BFS 搜索
不知道为什么比赛的时候一直想着用DFS 来写 一直想剪枝结果还是TLE = = 这题数据量不大,又是问最优解,那么一般来说是用 BFS 来写 int commandi[4] = {1, 2, 3, 4 ...
- USACO Healthy Holsteins DFS
使用排列组合,遍历所有可能的情况C(1)+C(2)+C(3)……C(n)= 2^G种组合 数据规模不大,暴力过去最多也就是2^15 = 23768种情况 所以就暴力咯,不过还是Debug了一会 Sou ...