文章详情

  • 游戏榜单
  • 软件榜单
关闭导航
热搜榜
热门下载
热门标签
php爱好者> php文档>mysql出现“mysqld got signal 11”的解决办法

mysql出现“mysqld got signal 11”的解决办法

时间:2010-10-14  来源:huifeideluotuo

今天mysql日志监控脚本发来短信,登录服务器后发现有以下异常信息:


101013  8:48:48 - mysqld got signal 11 ;
This could be because you hit a bug. It is also possible that this binary
or one of the libraries it was linked against is corrupt, improperly built,
or misconfigured. This error can also be caused by malfunctioning hardware.
We will try our best to scrape up some info that will hopefully help diagnose
the problem, but since we have already crashed, something is definitely wrong
and this may fail.

key_buffer_size=1073741824
read_buffer_size=262144
max_used_connections=32
max_threads=600
threads_connected=9
It is possible that mysqld could use up to
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 1926887 K
bytes of memory
Hope that's ok; if not, decrease some variables in the equation.

thd: 0x6d55efb0
Attempting backtrace. You can use the following information to find out
where mysqld died. If you see no messages after this, something went
terribly wrong...
stack_bottom = 0x64e3b4 thread_stack 0x30000
/usr/local/mysql/bin/mysqld(my_print_stacktrace+0x16) [0x85045f4]
/usr/local/mysql/bin/mysqld(threads+0) [0x8747aac]
/usr/local/mysql/bin/mysqld(THD::~THD()+0) [0x81d4748]
[0xba0c2444]
Trying to get some variables.
Some pointers may be invalid and cause the dump to abort...
thd->query at 0x97b2c30 = SELECT p.*, "public" AS `type` FROM posts p WHERE (user_id<>0 OR group_id<>0)  ORDER BY p.id DESC LIMIT 10
thd->thread_id=34830
thd->killed=NOT_KILLED
The manual page at http://dev.mysql.com/doc/mysql/en/crashing.html contains
information that should help you find out what is causing the crash.
101013 08:48:49 mysqld_safe Number of processes running now: 0
101013 08:48:49 mysqld_safe mysqld restarted


紧接着就是数据库频繁重启,通过上面的信息可以大概知道是由于mysql的bug引起,于是就到官方站点查找相关资料,网上的这类问题都是出现在版本为4,或者5.0,我的DB的版本的5.1.33,应该早都解决这类问题了,为啥还有这个问题呢,不解?

开始以为是参数设置的不正确引起,通过修改参数变量,跟踪一段时间还是有问题,郁闷!

最后详细看了下上面的错误日志信息,发现有一条SQL语句被记录下来“SELECT p.*, "public" AS `type` FROM posts p WHERE (user_id<>0 OR group_id<>0)  ORDER BY p.id DESC LIMIT 10”,和开发那边沟通后,确实有这样的业务需求,于是就将该表导入到另外一台mysql环境相同的服务器,再次执行该语句,马上出现mysql重启的问题,换一个高版本(5.1.49)试试,再次执行该语句,没有问题,这样问题就找到了,果真的mysql版本的问题。问题就出现where后面的条件上(user_id<>0 OR group_id<>0),只要加上条件就会挂掉,不解?

总结:
1、一定要细心查看mysql错误日志,不放过任何一个信息。
2、定期对mysql版本进行升级,尽量使用mysql的稳定版本。
相关阅读 更多 +
排行榜 更多 +
辰域智控app

辰域智控app

系统工具 下载
网医联盟app

网医联盟app

运动健身 下载
汇丰汇选App

汇丰汇选App

金融理财 下载