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

Keywords: MySQL zlib

Look at the log information first after the problem occurs. Don't be blind.

View the error log

The error log is as follows:

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

The prompt is InnoDB memory error and unallocated buffer pool. Modify innodb's slow-down pool directly

Modify the value of innodb_buffer_pool_size

Modify the previous 512M to 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

But found a problem, another server configuration as follows, but did not occur above errors, currently no reason.

# 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

Posted by Rex__ on Tue, 12 Feb 2019 00:21:18 -0800