您的位置:首页 > 产品设计 > UI/UE

The server quit without updating PID file (/bak/local/mysql/var/file.pid)

2017-05-24 13:52 441 查看
出现问题以后第一步先查看日志信息,千万不要瞎子摸象

查看错误日志

错误日志如下:

170524 04:01:04 mysqld_safe mysqld from pid file /bak/local/mysql/var/iZuf6ixy03u72vzno4jsiuZ.pid ended
170524 11:34:25 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/var
2017-05-24 11:34:25 0 [Note] /bak/local/mysql/bin/mysqld (mysqld 5.6.29-log) starting as process 26665 ...
2017-05-24 11:34:25 26665 [Note] Plugin 'FEDERATED' is disabled.
2017-05-24 11:34:25 26665 [Note] InnoDB: Using atomics to ref count buffer pool pages
2017-05-24 11:34:25 26665 [Note] InnoDB: The InnoDB memory heap is disabled
2017-05-24 11:34:25 26665 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2017-05-24 11:34:25 26665 [Note] InnoDB: Memory barrier is not used
2017-05-24 11:34:25 26665 [Note] InnoDB: Compressed tables use zlib 1.2.3
2017-05-24 11:34:26 26665 [Note] InnoDB: Using CPU crc32 instructions
2017-05-24 11:34:26 26665 [Note] InnoDB: Initializing buffer pool, size = 512.0M
InnoDB: mmap(549453824 bytes) failed; errno 12
2017-05-24 11:34:26 26665 [ERROR] InnoDB: Cannot allocate memory for the buffer pool
2017-05-24 11:34:26 26665 [ERROR] Plugin 'InnoDB' init function returned error.
2017-05-24 11:34:26 26665 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2017-05-24 11:34:26 26665 [ERROR] Unknown/unsupported storage engine: INNODB
2017-05-24 11:34:26 26665 [ERROR] Aborting


提示是innodb内存错误,无法分配的缓冲池。直接修改innodb的缓中池即可

修改innodb_buffer_pool_size的值

将以前为512M修改成1024M

default_storage_engine = InnoDB
innodb_data_home_dir = /bak/local/mysql/var
innodb_data_file_path = ibdata1:10M:autoextend
innodb_log_group_home_dir = /bak/local/mysql/var
innodb_buffer_pool_size = 1024M
innodb_log_file_size = 128M
innodb_log_buffer_size = 8M
innodb_flush_log_at_trx_commit = 1
innodb_lock_wait_timeout = 50


但发现一个问题,另一台服务器的配置如下,但没有发生过以上错误,目前没有找到原因。

# Uncomment the following if you are using InnoDB tables
innodb_data_home_dir = /bak/mysql/var
innodb_data_file_path = ibdata1:10M:autoextend
innodb_log_group_home_dir = /bak/mysql/var
# You can set .._buffer_pool_size up to 50 - 80 %
# of RAM but beware of setting memory usage too high
innodb_buffer_pool_size = 16M
innodb_additional_mem_pool_size = 2M
# Set .._log_file_size to 25 % of buffer pool size
innodb_log_file_size = 5M
innodb_log_buffer_size = 8M
innodb_flush_log_at_trx_commit = 1
innodb_lock_wait_timeout = 50
innodb_force_recovery = 0
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐