开发者社区> 问答> 正文

mysql 5.7不定期的hang住重启

线上一台mysql 5.7.17版本实例,系统centos 6.4 ,96G内存,SSD磁盘,buffer pool 60G,buffer pool instance 8,24 CPU。实例访问情况如下:
screenshot
不定期的夯住重启,每次状态都是一致,error log如下输出:
nnoDB: ###### Diagnostic info printed to the standard error stream
2017-05-01T19:21:24.095658+08:00 0 [Warning] InnoDB: A long semaphore wait:
--Thread 139927055582976 has waited at buf0flu.cc line 1209 for 303.00 seconds the semaphore:
SX-lock on RW-latch at 0x7f448b83aa70 created in file buf0buf.cc line 1459
a writer (thread id 139928763602688) has reserved it in mode exclusive
number of readers 0, waiters flag 1, lock_word: 0
Last time read locked in file row0sel.cc line 3652
Last time write locked in file /export/home/pb2/build/sb_0-21378219-1480347226.17/mysql-5.7.17/storage/innobase/btr/btr0cur.cc line 299
2017-05-01T19:21:24.095746+08:00 0 [Warning] InnoDB: A long semaphore wait:
--Thread 139927087052544 has waited at buf0flu.cc line 1209 for 303.00 seconds the semaphore:
SX-lock on RW-latch at 0x7f463e8eeb08 created in file buf0buf.cc line 1459
a writer (thread id 139928763602688) has reserved it in mode exclusive
number of readers 0, waiters flag 1, lock_word: 0
Last time read locked in file row0sel.cc line 3652
Last time write locked in file /export/home/pb2/build/sb_0-21378219-1480347226.17/mysql-5.7.17/storage/innobase/btr/btr0cur.cc line 315
2017-05-01T19:21:24.095798+08:00 0 [Warning] InnoDB: A long semaphore wait:
--Thread 139921740433152 has waited at row0ins.cc line 2481 for 303.00 seconds the semaphore:
S-lock on RW-latch at 0x7f49d5fc2be8 created in file buf0buf.cc line 1459
a writer (thread id 139928763602688) has reserved it in mode exclusive
number of readers 0, waiters flag 1, lock_word: 0
Last time read locked in file row0ins.cc line 2481
Last time write locked in file /export/home/pb2/build/sb_0-21378219-1480347226.17/mysql-5.7.17/storage/innobase/include/mtr0mtr.ic line 153
2017-05-01T19:21:24.095871+08:00 0 [Warning] InnoDB: A long semaphore wait:
--Thread 139921726056192 has waited at row0ins.cc line 2481 for 303.00 seconds the semaphore:
S-lock on RW-latch at 0x7f49d5fc2be8 created in file buf0buf.cc line 1459
a writer (thread id 139928763602688) has reserved it in mode exclusive
number of readers 0, waiters flag 1, lock_word: 0
Last time read locked in file row0ins.cc line 2481
Last time write locked in file /export/home/pb2/build/sb_0-21378219-1480347226.17/mysql-5.7.17/storage/innobase/include/mtr0mtr.ic line 153
2017-05-01T19:21:24.095917+08:00 0 [Warning] InnoDB: A long semaphore wait:
--Thread 139921718867712 has waited at row0ins.cc line 2481 for 303.00 seconds the semaphore:
S-lock on RW-latch at 0x7f49d5fc2be8 created in file buf0buf.cc line 1459
a writer (thread id 139928763602688) has reserved it in mode exclusive
number of readers 0, waiters flag 1, lock_word: 0
Last time read locked in file row0ins.cc line 2481
Last time write locked in file /export/home/pb2/build/sb_0-21378219-1480347226.17/mysql-5.7.17/storage/innobase/include/mtr0mtr.ic line 153
2017-05-01T19:21:24.095959+08:00 0 [Warning] InnoDB: A long semaphore wait:
--Thread 139927097542400 has waited at buf0flu.cc line 1209 for 303.00 seconds the semaphore:
SX-lock on RW-latch at 0x7f49d5fc2be8 created in file buf0buf.cc line 1459
a writer (thread id 139928763602688) has reserved it in mode exclusive
number of readers 0, waiters flag 1, lock_word: 0
Last time read locked in file row0ins.cc line 2481
Last time write locked in file /export/home/pb2/build/sb_0-21378219-1480347226.17/mysql-5.7.17/storage/innobase/include/mtr0mtr.ic line 153
从日志看,是长时间的信号等待触发了重启,之前5.7.13版本也出现,升级到5.7.17还是一样。
最开始怀疑是系统信号集设置不够,从250 32000 32 128 调整到2500 3200000 3200 1280,
还是出现了重启。从日志中看都在等待139928763602688 线程,从日志的下文可以得到该线程只是一条简单的insert语句,并没有其他异常查询,而且每次夯住时的语句并不相同。此外该实例之前运行在5.5版本下,没出现过该问题。请问该问题应该如何处理?

展开
收起
daxi11 2017-05-03 14:06:33 9598 0
1 条回答
写回答
取消 提交回答
  • glibc内存分配 bug,升级glibc

    2019-07-17 21:07:57
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
搭建电商项目架构连接MySQL 立即下载
搭建4层电商项目架构,实战连接MySQL 立即下载
PolarDB MySQL引擎重磅功能及产品能力盛大发布 立即下载

相关镜像