免费注册 查看新帖 |

Chinaunix

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

MySQL crash 老问题了。再发出来讨论下 [复制链接]

论坛徽章:
1
双子座
日期:2013-08-19 14:56:16
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2009-02-05 12:59 |只看该作者 |倒序浏览
10可用积分
下面是机器信息和调试信息,肯定是配置文件引起的,所以就没必要拿出来了。
想大家主要谈一下,为什么会出现这个问题:32位linux?libc?pthread?stack?或者其他  

  1. debian:~# uname -a
  2. Linux debian 2.6.18-6-686-bigmem #1 SMP Mon Oct 13 17:32:29 UTC 2008 i686 GNU/Linux
复制代码
  1. debian:~# free -m
  2.              total       used       free     shared    buffers     cached
  3. Mem:         16239       8500       7739          0         30       8323
  4. -/+ buffers/cache:        147      16092
  5. Swap:            0          0          0
复制代码
  1. Intel(R) Xeon(R) CPU           E5405  @ 2.00GHz
复制代码
  1. debian:~# ulimit -a
  2. core file size          (blocks, -c) 0
  3. data seg size           (kbytes, -d) unlimited
  4. max nice                        (-e) 0
  5. file size               (blocks, -f) unlimited
  6. pending signals                 (-i) unlimited
  7. max locked memory       (kbytes, -l) unlimited
  8. max memory size         (kbytes, -m) unlimited
  9. open files                      (-n) 1024
  10. pipe size            (512 bytes, -p) 8
  11. POSIX message queues     (bytes, -q) unlimited
  12. max rt priority                 (-r) 0
  13. stack size              (kbytes, -s) 8192
  14. cpu time               (seconds, -t) unlimited
  15. max user processes              (-u) unlimited
  16. virtual memory          (kbytes, -v) unlimited
  17. file locks                      (-x) unlimited
复制代码
  1. +--------------------------+
  2. | version()                |
  3. +--------------------------+
  4. | 5.0.32-Debian_7etch8-log |
  5. +--------------------------+
复制代码

  1. Feb  4 16:49:33 debian mysqld[2936]: 090204 16:49:33 [ERROR] Out of memory; check if mysqld or some other process uses all available memory; if not, you may have to use 'ulimit' to allow mysqld to use more memory or you can add more swap space
  2. Feb  4 16:49:33 debian mysqld[2936]: mysqld got signal 11;
  3. Feb  4 16:49:33 debian mysqld[2936]: This could be because you hit a bug. It is also possible that this binary
  4. Feb  4 16:49:33 debian mysqld[2936]: or one of the libraries it was linked against is corrupt, improperly built,
  5. Feb  4 16:49:33 debian mysqld[2936]: or misconfigured. This error can also be caused by malfunctioning hardware.
  6. Feb  4 16:49:33 debian mysqld[2936]: We will try our best to scrape up some info that will hopefully help diagnose
  7. Feb  4 16:49:33 debian mysqld[2936]: the problem, but since we have already crashed, something is definitely wrong
  8. Feb  4 16:49:33 debian mysqld[2936]: and this may fail.
  9. Feb  4 16:49:33 debian mysqld[2936]:
  10. Feb  4 16:49:33 debian mysqld[2936]: key_buffer_size=33554432
  11. Feb  4 16:49:33 debian mysqld[2936]: read_buffer_size=2093056
  12. Feb  4 16:49:33 debian mysqld[2936]: max_used_connections=33
  13. Feb  4 16:49:33 debian mysqld[2936]: max_connections=100
  14. Feb  4 16:49:33 debian mysqld[2936]: threads_connected=31
  15. Feb  4 16:49:33 debian mysqld[2936]: It is possible that mysqld could use up to
  16. Feb  4 16:49:33 debian mysqld[2936]: key_buffer_size + (read_buffer_size + sort_buffer_size)*max_connections = 1056367 K
  17. Feb  4 16:49:33 debian mysqld[2936]: bytes of memory
  18. Feb  4 16:49:33 debian mysqld[2936]: Hope that's ok; if not, decrease some variables in the equation.
  19. Feb  4 16:49:33 debian mysqld[2936]:
  20. Feb  4 16:49:33 debian mysqld[2936]: thd=0x8ca81e0
  21. Feb  4 16:49:33 debian mysqld[2936]: Attempting backtrace. You can use the following information to find out
  22. Feb  4 16:49:33 debian mysqld[2936]: where mysqld died. If you see no messages after this, something went
  23. Feb  4 16:49:33 debian mysqld[2936]: terribly wrong...
  24. Feb  4 16:49:33 debian mysqld[2936]: Cannot determine thread, fp=0xaf2759f8, backtrace may not be correct.
  25. Feb  4 16:49:33 debian mysqld[2936]: Stack range sanity check OK, backtrace follows:
  26. Feb  4 16:49:33 debian mysqld[2936]: 0x81c0759
  27. Feb  4 16:49:33 debian mysqld[2936]: 0x822d274
  28. Feb  4 16:49:33 debian mysqld[2936]: 0x81c048c
  29. Feb  4 16:49:33 debian mysqld[2936]: 0x84863b8
  30. Feb  4 16:49:33 debian mysqld[2936]: 0x8293d97
  31. Feb  4 16:49:33 debian mysqld[2936]: 0x81db37b
  32. Feb  4 16:49:33 debian mysqld[2936]: 0x81dbeb7
  33. Feb  4 16:49:33 debian mysqld[2936]: 0x81dc370
  34. Feb  4 16:49:33 debian mysqld[2936]: 0x81dd638
  35. Feb  4 16:49:33 debian mysqld[2936]: 0x81de044
  36. Feb  4 16:49:33 debian mysqld[2936]: 0xb7f1e240
  37. Feb  4 16:49:33 debian mysqld[2936]: 0xb7d5949e
  38. Feb  4 16:49:33 debian mysqld[2936]: New value of fp=(nil) failed sanity check, terminating stack trace!
  39. Feb  4 16:49:33 debian mysqld[2936]: Please read [url]http://dev.mysql.com/doc/mysql/en/using-stack-trace.html[/url] and follow instructions on how to resolve the stack trace. Resolved
  40. Feb  4 16:49:33 debian mysqld[2936]: stack trace is much more helpful in diagnosing the problem, so please do
  41. Feb  4 16:49:33 debian mysqld[2936]: resolve it
  42. Feb  4 16:49:33 debian mysqld[2936]: Trying to get some variables.
  43. Feb  4 16:49:33 debian mysqld[2936]: Some pointers may be invalid and cause the dump to abort...
  44. Feb  4 16:49:33 debian mysqld[2936]: thd->query at 0x8cbf7a8 = create table DB_CHATLOG_0.t_chatlog_20090204 (^I^I  `chat_sender_id` int(10) NOT NULL default '0',^I^I  `chat_recver_id` int(10) NOT NULL default '0',^I^I  `chat_time` int(10) NOT NULL default '0',^I^I  `chat_msg_len` int(5) NOT NULL default '0',^I^I  `chat_msg_buf` varchar(100),^I^I  KEY `i_chatlog_1` (`chat_sender_id`)^I^I)ENGINE=memory, CHARSET=utf8
  45. Feb  4 16:49:33 debian mysqld[2936]: thd->thread_id=288
  46. Feb  4 16:49:33 debian mysqld[2936]: The manual page at [url]http://www.mysql.com/doc/en/Crashing.html[/url] contains
  47. Feb  4 16:49:33 debian mysqld[2936]: information that should help you find out what is causing the crash.
  48. Feb  4 16:49:33 debian mysqld_safe[4604]: ended
复制代码

最佳答案

查看完整内容

没有swap 嘛? 最大连接数都100 这么小了,内存感觉肯定不会超支阿。是配置文件就好说了。

论坛徽章:
0
2 [报告]
发表于 2009-02-05 12:59 |只看该作者
没有swap 嘛?

最大连接数都100 这么小了,内存感觉肯定不会超支阿。是配置文件就好说了。

论坛徽章:
1
双子座
日期:2013-08-19 14:56:16
3 [报告]
发表于 2009-02-06 09:08 |只看该作者
人缘 不行呀,帖子都要沉了,
大海呀大海
如果大海能够带走我的哀愁
就像带走每条河流

论坛徽章:
0
4 [报告]
发表于 2009-02-06 11:50 |只看该作者
内存16G,才用了一半不到。
把配置文件移走,使用默认参数启动看有没有问题。

论坛徽章:
0
5 [报告]
发表于 2009-02-06 11:56 |只看该作者
帮你顶上去!
今天我也遇到了,问题一样:
[root@dn2web040 errlog]# uname -a
Linux dn2web040.sae.com.hk 2.6.18-53.el5 #1 SMP Wed Oct 10 16:34:02 EDT 2007 i686 i686 i386 GNU/Linux

[root@dn2web040 errlog]# mysql
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 5 to server version: 5.0.64-enterprise-gpl-log

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

论坛徽章:
0
6 [报告]
发表于 2009-02-06 18:00 |只看该作者
楼主,原来我也遇到这样的错误,目前我的mysql没有出现这样的错误信息。 可以说我是花了不少功夫在my.cnf的配置参数上。

解决方法如下,
1,首先升级mysql到最新的版本。我用的是官方已经编译好的版本。5.1.22
2,用mysqlreport和tuner-primer,这2个工具结合到一起,进行调优。

论坛徽章:
0
7 [报告]
发表于 2009-02-08 17:49 |只看该作者
my.cnf配置文件贴出来!很多参数肯定没有设置 ENGINE主要是MYISAM还是INNODB

论坛徽章:
1
双子座
日期:2013-08-19 14:56:16
8 [报告]
发表于 2009-02-09 09:22 |只看该作者
这个肯定是配置文件引起的, 32位的进程虚拟地址空间最大4G,应该就是这个问题造成的。

论坛徽章:
0
9 [报告]
发表于 2009-02-09 11:55 |只看该作者

回复 #8 猪知猪之道 的帖子

晕I686的。换64位吧
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP