Discuz!官方免费开源建站系统

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索

mysql 经常性宕掉求助

[复制链接]
libertine 发表于 2006-12-20 14:18:55 | 显示全部楼层 |阅读模式
错误日志如下:mysql自己会重启,但原进程没杀掉,所以重启就报错,结果mysql就宕了


操作系统:AS4,  CPU 双智强2.8G,内存4G,硬盘scsi 三块 做raid5, Mysql 是4.0.24版本的,RPM安装的,运行从D4升级上来的D5论坛,web在另外一台,通过内网连接数据库

错误日志如下:

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=268435456
read_buffer_size=2093056
max_used_connections=324
max_connections=1000
threads_connected=12
It is possible that mysqld could use up to
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_connections = 1183832 K
bytes of memory
Hope that's ok; if not, decrease some variables in the equation.


thd=0x917a9690
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...
Cannot determine thread, fp=0xbe7bde38, backtrace may not be correct.
Stack range sanity check OK, backtrace follows:
0x8072da4
0x826d468
0x82684d4
0x80c15f0
0x80c1308
0x80c1178
0x80c0a5d
0x8098ff9
0x80999e8
0x8097ac9
0x80971b6
0x807e182
0x8081be5
0x807d1a3
0x807cbfe
0x807c428
0x826ac1c
0x82a0aca
New value of fp=(nil) failed sanity check, terminating stack trace!
Please read http://dev.mysql.com/doc/mysql/en/Using_stack_trace.html and follow instructions on how to resolve the stack trace. Reso
lved
stack trace is much more helpful in diagnosing the problem, so please do
resolve it
Trying to get some variables.
Some pointers may be invalid and cause the dump to abort...
thd->query at 0x98ba3a98  is invalid pointer
thd->thread_id=3217286
The manual page at http://www.mysql.com/doc/en/Crashing.html contains
information that should help you find out what is causing the crash.


Number of processes running now: 1
mysqld process hanging, pid 31733 - killed
061220 12:17:47  mysqld restarted
061220 12:17:48 Warning: Asked for 196608 thread stack, but got 126976
061220 12:17:48 Can't start server: Bind on TCP/IP port: Address already in use
061220 12:17:48 Do you already have another mysqld server running on port: 3306 ?
061220 12:17:48 Aborting


061220 12:17:48 /usr/sbin/mysqld: Shutdown Complete

061220 12:17:48  mysqld ended

061220 12:56:56  mysqld started
061220 12:56:56 Warning: Asked for 196608 thread stack, but got 126976
/usr/sbin/mysqld: ready for connections.
Version: '4.0.24-standard-log'  socket: '/home/xxxxx/mysql.sock'  port: 3306  Official MySQL RPM
wildcat707 发表于 2006-12-20 15:05:14 | 显示全部楼层
key_buffer_size=268435456
read_buffer_size=2093056
设置的有问题吧,太大了。
回复

使用道具 举报

 楼主| libertine 发表于 2006-12-20 16:22:24 | 显示全部楼层
原帖由 wildcat707 于 2006-12-20 15:05 发表
key_buffer_size=268435456
read_buffer_size=2093056
设置的有问题吧,太大了。



这是my.cnf配置

[root@mysql ~]# cat /etc/my.cnf
[client]
#password       = your_password
port            = 3306
socket          = /home/xxxxx/mysql.sock

[mysqld]
port = 3306
socket = /home/xxxxx/mysql.sock
skip-innodb
skip-bdb
skip-locking
key_buffer = 256M
myisam_sort_buffer_size = 48M
join_buffer_size = 2M
read_buffer_size = 2M
sort_buffer_size = 3M
table_cache = 1028
thread_cache_size = 256
query_cache_limit = 4M
query_cache_size = 256M
query_cache_type = 1
max_connections = 1000
max_allowed_packet = 16M
open_files_limit = 432537
long_query_time = 100
max_tmp_tables  = 128
max_write_lock_count = 1
log-bin=mysql-bin
skip-name-resolve
default-character-set=gbk

这样会太大吗?内存可是4G的,而且只运行mysql程序,建议怎样的配置才好,谢谢
回复

使用道具 举报

chancey 发表于 2006-12-20 16:33:19 | 显示全部楼层
thread_cache_size = 32
query_cache_size = 64M
max_allowed_packet = 2M
#log-bin=mysql-bin
回复

使用道具 举报

 楼主| libertine 发表于 2006-12-20 17:44:42 | 显示全部楼层
原帖由 chancey 于 2006-12-20 16:33 发表
thread_cache_size = 32
query_cache_size = 64M
max_allowed_packet = 2M
#log-bin=mysql-bin



这个会不会太小了,论坛访问量是比较大的,基本都有3000人同时在线
回复

使用道具 举报

chancey 发表于 2006-12-20 18:36:37 | 显示全部楼层
8000同时在线的照样
thread_cache_size 太高MYSQL容易挂
回复

使用道具 举报

wildcat707 发表于 2006-12-21 09:28:39 | 显示全部楼层
加一句
max_connect_errors = 1000000
回复

使用道具 举报

 楼主| libertine 发表于 2006-12-21 10:02:50 | 显示全部楼层
谢谢,可以试一下这些设置,如果有改善回来再感谢你们
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版|小黑屋|Discuz! 官方站 ( 皖ICP备16010102号 )star

GMT+8, 2025-2-28 07:01 , Processed in 0.026428 second(s), 5 queries , Gzip On, Redis On.

Powered by Discuz! X3.4

Copyright © 2001-2023, Tencent Cloud.

快速回复 返回顶部 返回列表