免费注册 查看新帖 |

Chinaunix

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

【讨论中】mysql隔几个月就当掉 [复制链接]

论坛徽章:
2
2015年亚洲杯之巴林
日期:2015-02-03 21:13:57数据库技术版块每日发帖之星
日期:2015-08-26 06:20:00
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2013-07-02 08:47 |只看该作者 |倒序浏览
本帖最后由 cenalulu 于 2013-07-02 15:16 编辑

mysql 数据库隔几个月就当掉,下面是错误log.是由于死锁引起的吗?

  1. select * from table123
  2. Trx read view will not see trx with id >= 0 3611757250, sees < 0 3611754257
  3. ---TRANSACTION 0 3611757091, ACTIVE 52 sec, process no 8304, OS thread id 2916936592
  4. mysql tables in use 1, locked 0
  5. MySQL thread id 32608, query id 780248056 localhost root Sending data
  6. select * from table123
  7. Trx read view will not see trx with id >= 0 3611757092, sees < 0 3611736852
  8. ---TRANSACTION 0 3611737563, COMMITTED IN MEMORY, process no 8304, OS thread id 2888760208 committing, thread declared inside InnoDB 498
  9. mysql tables in use 1, locked 1
  10. , undo log entries 1
  11. MySQL thread id 30043, query id 780228528 localhost root end
  12. update `ignore` set `i_count`=2249 , `updatetime`=1371097812
  13. --------
  14. FILE I/O
  15. --------
  16. I/O thread 0 state: waiting for i/o request (insert buffer thread)
  17. I/O thread 1 state: waiting for i/o request (log thread)
  18. I/O thread 2 state: waiting for i/o request (read thread)
  19. I/O thread 3 state: waiting for i/o request (write thread)
  20. Pending normal aio reads: 0, aio writes: 0,
  21. ibuf aio reads: 0, log i/o's: 0, sync i/o's: 0
  22. Pending flushes (fsync) log: 1; buffer pool: 0
  23. 92 OS file reads, 2583849 OS file writes, 2423491 OS fsyncs
  24. 0.00 reads/s, 0 avg bytes/read, 0.04 writes/s, 0.04 fsyncs/s
  25. -------------------------------------
  26. INSERT BUFFER AND ADAPTIVE HASH INDEX
  27. -------------------------------------
  28. Ibuf: size 1, free list len 0, seg size 2,
  29. 0 inserts, 0 merged recs, 0 merges
  30. Hash table size 34679, used cells 5193, node heap has 7 buffer(s)
  31. 0.00 hash searches/s, 0.00 non-hash searches/s
  32. ---
  33. LOG
  34. ---
  35. Log sequence number 0 917197117
  36. Log flushed up to   0 917196041
  37. Last checkpoint at  0 917195741
  38. 1 pending log writes, 0 pending chkp writes
  39. 1789840 log i/o's done, 0.04 log i/o's/second
  40. ----------------------
  41. BUFFER POOL AND MEMORY
  42. ----------------------
  43. Total memory allocated 18326854; in additional pool allocated 1039488
  44. Buffer pool size   512
  45. Free buffers       353
  46. Database pages     152
  47. Modified db pages  4
  48. Pending reads 0
  49. Pending writes: LRU 0, flush list 0, single page 0
  50. Pages read 116, created 36, written 532066
  51. 0.00 reads/s, 0.00 creates/s, 0.00 writes/s
  52. Buffer pool hit rate 1000 / 1000
  53. --------------
  54. ROW OPERATIONS
  55. --------------
  56. 1 queries inside InnoDB, 0 queries in queue
  57. 19 read views open inside InnoDB
  58. Main thread process no. 8304, id 2996677520, state: flushing log
  59. Number of rows inserted 67316, updated 75290, deleted 0, read 1762953908
  60. 0.00 inserts/s, 0.00 updates/s, 0.00 deletes/s, 5435.60 reads/s
  61. ----------------------------
  62. END OF INNODB MONITOR OUTPUT
  63. ============================
  64. InnoDB: ###### Diagnostic info printed to the standard error stream

  65. Number of processes running now: 0
  66. 130628 21:35:03  mysqld restarted
  67. 130628 21:35:05 [Warning] option 'max_join_size': unsigned value 18446744073709551615 adjusted to 4294967295
  68. 130628 21:35:05 [Warning] option 'max_join_size': unsigned value 18446744073709551615 adjusted to 4294967295
  69. InnoDB: The log sequence number in ibdata files does not match
  70. InnoDB: the log sequence number in the ib_logfiles!
  71. 130628 21:35:06  InnoDB: Database was not shut down normally!
  72. InnoDB: Starting crash recovery.
  73. InnoDB: Reading tablespace information from the .ibd files...
  74. InnoDB: Restoring possible half-written data pages from the doublewrite
  75. InnoDB: buffer...
  76. 130628 21:35:07  InnoDB: Started; log sequence number 0 938296578
  77. 130628 21:35:07 [Note] /usr/libexec/mysqld: ready for connections.
  78. Version: '5.0.77'  socket: '/var/lib/mysql/mysql.sock'  port: 3306  Source distribution

  79. Number of processes running now: 0
  80. 130628 23:35:27  mysqld restarted
  81. 130628 23:35:32 [Warning] option 'max_join_size': unsigned value 18446744073709551615 adjusted to 4294967295
  82. 130628 23:35:32 [Warning] option 'max_join_size': unsigned value 18446744073709551615 adjusted to 4294967295
  83. InnoDB: The log sequence number in ibdata files does not match
  84. InnoDB: the log sequence number in the ib_logfiles!
  85. 130628 23:35:33  InnoDB: Database was not shut down normally!
  86. InnoDB: Starting crash recovery.
  87. InnoDB: Reading tablespace information from the .ibd files...
  88. InnoDB: Restoring possible half-written data pages from the doublewrite
  89. InnoDB: buffer...
  90. 130628 23:35:36  InnoDB: Started; log sequence number 0 938303752
  91. 130628 23:35:39 [Note] /usr/libexec/mysqld: ready for connections.
  92. Version: '5.0.77'  socket: '/var/lib/mysql/mysql.sock'  port: 3306  Source distribution

  93. Number of processes running now: 0
  94. 130629 00:27:24  mysqld restarted
  95. 130629  0:27:35 [Warning] option 'max_join_size': unsigned value 18446744073709551615 adjusted to 4294967295
  96. 130629  0:27:35 [Warning] option 'max_join_size': unsigned value 18446744073709551615 adjusted to 4294967295
  97. 130629 00:34:59  mysqld ended

  98. 130629 09:38:36  mysqld started
  99. 130629  9:38:37 [Warning] option 'max_join_size': unsigned value 18446744073709551615 adjusted to 4294967295
  100. 130629  9:38:37 [Warning] option 'max_join_size': unsigned value 18446744073709551615 adjusted to 4294967295
  101. InnoDB: The log sequence number in ibdata files does not match
  102. InnoDB: the log sequence number in the ib_logfiles!
  103. 130629  9:38:38  InnoDB: Database was not shut down normally!
  104. InnoDB: Starting crash recovery.
  105. InnoDB: Reading tablespace information from the .ibd files...
  106. InnoDB: Restoring possible half-written data pages from the doublewrite
  107. InnoDB: buffer...
  108. 130629  9:38:39  InnoDB: Started; log sequence number 0 938303882
  109. 130629  9:38:40 [Note] /usr/libexec/mysqld: ready for connections.
  110. Version: '5.0.77'  socket: '/var/lib/mysql/mysql.sock'  port: 3306  Source distribution

  111. Number of processes running now: 0
  112. 130629 12:10:54  mysqld restarted
  113. 130629 12:11:08 [Warning] option 'max_join_size': unsigned value 18446744073709551615 adjusted to 4294967295
  114. 130629 12:11:08 [Warning] option 'max_join_size': unsigned value 18446744073709551615 adjusted to 4294967295
  115. InnoDB: The log sequence number in ibdata files does not match
  116. InnoDB: the log sequence number in the ib_logfiles!
  117. 130629 12:11:19  InnoDB: Database was not shut down normally!
  118. InnoDB: Starting crash recovery.
  119. InnoDB: Reading tablespace information from the .ibd files...
  120. InnoDB: Restoring possible half-written data pages from the doublewrite
  121. InnoDB: buffer...
  122. 130629 12:12:25  InnoDB: Started; log sequence number 0 938327306
  123. 130629 12:16:09  mysqld ended

  124. 130629 13:24:50  mysqld started
  125. 130629 13:24:50 [Warning] option 'max_join_size': unsigned value 18446744073709551615 adjusted to 4294967295
  126. 130629 13:24:50 [Warning] option 'max_join_size': unsigned value 18446744073709551615 adjusted to 4294967295
  127. InnoDB: The log sequence number in ibdata files does not match
  128. InnoDB: the log sequence number in the ib_logfiles!
  129. 130629 13:24:50  InnoDB: Database was not shut down normally!
  130. InnoDB: Starting crash recovery.
  131. InnoDB: Reading tablespace information from the .ibd files...
  132. InnoDB: Restoring possible half-written data pages from the doublewrite
  133. InnoDB: buffer...
  134. 130629 13:24:51  InnoDB: Started; log sequence number 0 938327345
  135. 130629 13:24:51 [Note] /usr/libexec/mysqld: ready for connections.
  136. Version: '5.0.77'  socket: '/var/lib/mysql/mysql.sock'  port: 3306  Source distribution
  137. 130629 13:27:29 [Note] /usr/libexec/mysqld: Normal shutdown

  138. 130629 13:27:29  InnoDB: Starting shutdown...
  139. 130629 13:27:30  InnoDB: Shutdown completed; log sequence number 0 938327345
  140. 130629 13:27:30 [Note] /usr/libexec/mysqld: Shutdown complete

  141. 130629 13:27:30  mysqld ended

  142. 130629 13:28:54  mysqld started
  143. 130629 13:28:54 [Warning] option 'max_join_size': unsigned value 18446744073709551615 adjusted to 4294967295
  144. 130629 13:28:54 [Warning] option 'max_join_size': unsigned value 18446744073709551615 adjusted to 4294967295
  145. 130629 13:28:55  InnoDB: Started; log sequence number 0 938327345
  146. 130629 13:28:55 [Note] /usr/libexec/mysqld: ready for connections.
  147. Version: '5.0.77'  socket: '/var/lib/mysql/mysql.sock'  port: 3306  Source distribution
复制代码

论坛徽章:
4
CU大牛徽章
日期:2013-03-13 15:32:35CU大牛徽章
日期:2013-03-13 15:38:15CU大牛徽章
日期:2013-03-13 15:38:52戌狗
日期:2013-12-27 15:08:11
2 [报告]
发表于 2013-07-02 09:37 |只看该作者

'max_join_size' ---这里优化下  sql慢语句查看下  

论坛徽章:
2
2015年亚洲杯之巴林
日期:2015-02-03 21:13:57数据库技术版块每日发帖之星
日期:2015-08-26 06:20:00
3 [报告]
发表于 2013-07-02 10:11 |只看该作者
回复 2# 小版主杀手

    多谢回复。
    重启应该不是max_join_size引起的吧。因为max_join_size这个错误出来之前就已经开始重启了。

论坛徽章:
0
4 [报告]
发表于 2013-07-02 11:04 |只看该作者
92 OS file reads, 2583849 OS file writes, 2423491 OS fsyncs

这么多文件写!

你的这个SQL要更新多少条记录?很多吗?if yes, 试一下分批更新
  1. update `ignore` set `i_count`=2249 , `updatetime`=1371097812
复制代码

论坛徽章:
9
每日论坛发贴之星
日期:2016-01-04 06:20:00数据库技术版块每日发帖之星
日期:2016-01-04 06:20:00每日论坛发贴之星
日期:2016-01-04 06:20:00数据库技术版块每日发帖之星
日期:2016-01-04 06:20:00IT运维版块每日发帖之星
日期:2016-01-04 06:20:00IT运维版块每日发帖之星
日期:2016-01-04 06:20:00综合交流区版块每日发帖之星
日期:2016-01-04 06:20:00综合交流区版块每日发帖之星
日期:2016-01-04 06:20:00数据库技术版块每周发帖之星
日期:2016-03-07 16:30:25
5 [报告]
发表于 2013-07-02 11:45 |只看该作者
你这边所有导入日志都显示mysql是正常shutdown: 130629 13:27:30  mysqld ended
有没有再往上一点日志?

论坛徽章:
2
2015年亚洲杯之巴林
日期:2015-02-03 21:13:57数据库技术版块每日发帖之星
日期:2015-08-26 06:20:00
6 [报告]
发表于 2013-07-03 08:56 |只看该作者
回复 5# cenalulu


    mysqld.zip (380.9 KB, 下载次数: 1)

多谢回复,这是全部的日志。

论坛徽章:
9
每日论坛发贴之星
日期:2016-01-04 06:20:00数据库技术版块每日发帖之星
日期:2016-01-04 06:20:00每日论坛发贴之星
日期:2016-01-04 06:20:00数据库技术版块每日发帖之星
日期:2016-01-04 06:20:00IT运维版块每日发帖之星
日期:2016-01-04 06:20:00IT运维版块每日发帖之星
日期:2016-01-04 06:20:00综合交流区版块每日发帖之星
日期:2016-01-04 06:20:00综合交流区版块每日发帖之星
日期:2016-01-04 06:20:00数据库技术版块每周发帖之星
日期:2016-03-07 16:30:25
7 [报告]
发表于 2013-07-03 12:50 |只看该作者
从日志来看mysql连最基础的trace都没打出来,不像是遇到bug什么突然推出的。感觉是操作系统级别的kill或者bug造成。
最好能结合宕机时的现场环境分析。
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP