你的位置:
问答吧
-> MySQL
-> 问题详情
mysql数据库突然停了
Number of processes running now: 1
mysqld process hanging, pid 17363 - killed
091223 21:26:13 mysqld restarted
091223 21:26:13 Warning: Asked for 196608 thread stack, but got 126976
091223 21:26:13 Warning: setrlimit couldn't increase number of open files to more than 1024 (request: 1049586)
091223 21:26:13 Warning: Changed limits: max_connections: 1000 table_cache: 64
091223 21:26:13 Can't start server: Bind on TCP/IP port: Address already in use
091223 21:26:13 Do you already have another mysqld server running on port: 3306 ?
091223 21:26:13 Aborting
091223 21:26:13 /usr/sbin/mysqld: Shutdown Complete
091223 21:26:13 mysqld ended
作者: rongjun_cui
发布时间: 2009-12-23
这个类似错误信息上那位朋友发过.....检查下3306是否被人用了,以及看下/etc/my.cnf中是否设置为3306还是其他的端口了
作者: jinguanding
发布时间: 2009-12-23
不是的,我想问的是为什么会mysqld process hanging, pid 17363 - killed
导致数据库restart,是因为一个pid被killed,所以导致数据库重启,但是数据库进程还没有完全释放
,所以才会出现Do you already have another mysqld server running on port: 3306 ,我的理解是这样的
前几天我发过,但是还没有解决啊!
作者: rongjun_cui
发布时间: 2009-12-24
应该是mysqld process hanging挂住,mysqld就尝试重启。但原来挂的mysqld还没把系统资源放开,如进程,端口等。所以尝试的mysqld就出错。
直接kill mysql pid吗?为什么不kill mysql connection呢?
作者: justin033
发布时间: 2009-12-24
mysql的那个版本有此功能了,我曾多次测试mysql5.1.x版本hanging也没反映了,是不是有人kill mysql进程,然后保护程序mysqld_safe 又起了个 估计在那个程序没关闭之前
当然你所描述的 有检测功能 那是非常不错的,但是我没获得这方面的资料,有的话请分享下
作者: jinguanding
发布时间: 2009-12-24
作者: jinguanding
发布时间: 2009-12-24
不好意思。写错,不是:mysqld就尝试重启,正如你所说应该是mysqld_safe的保护作用重启mysqld。
作者: justin033
发布时间: 2009-12-24
学习..
作者: sqlwhy
发布时间: 2009-12-24
呵呵............ 大家互相学习与指出疑问的地方
不过LZ这个问题...最好能提点更详细的配置(my.cnf)与版本号 告诉我们大家 ,以及看能不能提供一些可重新的方式
因为官方网站上的情况,跟你的信息有点不太一样,而且上面是老版本的问题
我们好测试帮你去尝试找到解决问题的真实原因,然后再寻找方法解决掉....
作者: jinguanding
发布时间: 2009-12-25
操作系统: Red Hat Enterprise Linux AS release 4 (Nahant)
物理内存:16G
cpu:Intel(R) Xeon(TM) MP CPU 2.20GHz (2颗双核)
mysql版本:mysqld Ver 4.0.20-standard for pc-linux on i686
cat /etc/my.cnf参数如下:
[mysqld]
port = 3306
default-character-set=gb2312
socket = /var/lib/mysql/mysql.sock
skip-locking
key_buffer = 256M
max_allowed_packet = 10M
table_cache = 256
sort_buffer_size = 4M
read_buffer_size = 256M
myisam_sort_buffer_size = 256M
thread_cache_size = 64
thread_stack = 126976
join_buffer_size = 128M
query_cache_size = 64M
max_connections = 1000
max_connect_errors = 10000000
open_files_limit = 4096
# Try number of CPU's*2 for thread_concurrency
thread_concurrency = 8 #8
#default-character-set=gb2312
操作系统:
root#ulimit -a
core file size (blocks, -c) 0
data seg size (kbytes, -d) unlimited
file size (blocks, -f) unlimited
pending signals (-i) 1024
max locked memory (kbytes, -l) 32
max memory size (kbytes, -m) unlimited
open files (-n) 65536
pipe size (512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
stack size (kbytes, -s) 10240
cpu time (seconds, -t) unlimited
max user processes (-u) 262144
virtual memory (kbytes, -v) unlimited
file locks (-x) unlimited
作者: rongjun_cui
发布时间: 2009-12-25
现在以上warning 信息已经解决了,
091223 21:26:13 Warning: Asked for 196608 thread stack, but got 126976
091223 21:26:13 Warning: setrlimit couldn't increase number of open files to more than 1024 (request: 1049586)
091223 21:26:13 Warning: Changed limits: max_connections: 1000 table_cache: 64
但是如下报错信息还在啊!
091225 15:44:25 Aborted connection 1334 to db: 'sds' user: 'root' host: `localh
ost' (Got an error reading communication packets)
091225 15:44:26 Aborted connection 7352 to db: 'sds' user: 'root' host: `localh
ost' (Got an error reading communication packets)
091225 15:44:27 Aborted connection 6187 to db: 'sds' user: 'root' host: `localh
ost' (Got an error reading communication packets)
091225 15:44:28 Aborted connection 5229 to db: 'sds' user: 'root' host: `localh
ost' (Got an error reading communication packets)
091225 15:44:29 Aborted connection 6851 to db: 'sds' user: 'root' host: `localh
ost' (Got an error reading communication packets)
作者: rongjun_cui
发布时间: 2009-12-25
mysqld Ver 4.0.20-standard for pc-linux on i686
官网上有报此的BUG信息
连接问题,这个应该是连接没有被正常关闭造成的.....查下应用的连接是否使用CLOSE()函数关闭了
作者: jinguanding
发布时间: 2009-12-25