yanqzh 发表于 2017-6-22 12:51:50

mysql频繁自动结束或僵死,自动重启都无用

错误代码:170622 12:30:03 Plugin 'FEDERATED' is disabled.
170622 12:30:03 InnoDB: The InnoDB memory heap is disabled
170622 12:30:03 InnoDB: Mutexes and rw_locks use GCC atomic builtins
170622 12:30:03 InnoDB: Compressed tables use zlib 1.2.7
170622 12:30:03 InnoDB: Initializing buffer pool, size = 32.0M
InnoDB: mmap(34340864 bytes) failed; errno 12
170622 12:30:03 InnoDB: Completed initialization of buffer pool
170622 12:30:03 InnoDB: Fatal error: cannot allocate memory for the buffer pool
170622 12:30:03 Plugin 'InnoDB' init function returned error.
170622 12:30:03 Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
170622 12:30:03 Unknown/unsupported storage engine: InnoDB
170622 12:30:03 Aborting

170622 12:30:03 /usr/local/mysql/bin/mysqld: Shutdown complete

170622 12:30:03 mysqld_safe mysqld from pid file /data/var/ebs-47166.pid ended
170622 12:31:02 mysqld_safe Starting mysqld daemon with databases from /data/var
170622 12:31:02 /usr/local/mysql/bin/mysqld (mysqld 5.5.48) starting as process 29689 ...
170622 12:31:02 Plugin 'FEDERATED' is disabled.
170622 12:31:02 InnoDB: The InnoDB memory heap is disabled
170622 12:31:02 InnoDB: Mutexes and rw_locks use GCC atomic builtins
170622 12:31:02 InnoDB: Compressed tables use zlib 1.2.7
170622 12:31:02 InnoDB: Initializing buffer pool, size = 32.0M
InnoDB: mmap(34340864 bytes) failed; errno 12
170622 12:31:02 InnoDB: Completed initialization of buffer pool
170622 12:31:02 InnoDB: Fatal error: cannot allocate memory for the buffer pool
170622 12:31:02 Plugin 'InnoDB' init function returned error.
170622 12:31:02 Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
170622 12:31:02 Unknown/unsupported storage engine: InnoDB
170622 12:31:02 Aborting

170622 12:31:02 /usr/local/mysql/bin/mysqld: Shutdown complete

170622 12:31:02 mysqld_safe mysqld from pid file /data/var/ebs-47166.pid ended自动重启代码:#!/bin/bash
pgrep -x mysqld &> /dev/null
if [ $? -ne 0 ]
then
echo "At time: `date` :MySQL error stop ." >> /home/wwwlogs/mysql_error_stop.log
/etc/init.d/mysql start
#echo "At time: `date` :MySQL server is stop."
else
echo "MySQL server is running ."
fi

yanqzh 发表于 2017-6-22 12:54:56

mysql路径从/usr/local/mysql变更为/data/了,但是innode没有变更路径,仍然是/usr/local/mysql

licess 发表于 2017-6-22 18:28:23

机器什么配置?
innodb_buffer_pool_size 调小些

yanqzh 发表于 2017-6-23 22:54:05

回复 3# 的帖子

只有16M了,机器内存总共2G

licess 发表于 2017-6-24 09:07:16

回复 4# 的帖子

估计有其他很占内存的程序,mysql都无法进行分配内存,如果不需要innodb可以关闭,就不受这个影响了
页: [1]
查看完整版本: mysql频繁自动结束或僵死,自动重启都无用