docker deployment mysql not start

surroundings

System: centos7.7

docker: 19

mysql: 8.0.18

The original URL changed

Error analysis

Log content

140505 16:05:59 InnoDB: Using Linux native AIO
140505 16:05:59  InnoDB: Warning: io_setup() failed with EAGAIN. Will make 5 attempts before giving up.
InnoDB: Warning: io_setup() attempt 1 failed.
InnoDB: Warning: io_setup() attempt 2 failed.
InnoDB: Warning: io_setup() attempt 3 failed.
InnoDB: Warning: io_setup() attempt 4 failed.
InnoDB: Warning: io_setup() attempt 5 failed.
140505 16:06:02  InnoDB: Error: io_setup() failed with EAGAIN after 5 attempts.
InnoDB: You can disable Linux Native AIO by setting innodb_use_native_aio = 0 in my.cnf
140505 16:06:02 InnoDB: Fatal error: cannot initialize AIO sub-system
140505 16:06:02 [ERROR] Plugin 'InnoDB' init function returned error.
140505 16:06:02 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
140505 16:06:02 [ERROR] Unknown/unsupported storage engine: InnoDB

problem analysis

See io_setupfor creating asynchronous I / O context for a particular purpose, error code EAGAINmeaning specified maxeventsexceeds available to the user eventsrestrictions.
On the server has been running for more MySQL instances, create an asynchronous I / O has reached a critical resource, the new instance failed to start.

A Solution

When start adding MySQL instance --innodb_use_native_aio = 0

Solution two

cat / proc / sys / fs / aio-max-nr can view the current value of aio-max-nr is typically 65536 (64k a)

in/etc/sysctl.conf

fs.aio-max-nr=262144  #(256k个)

Execute the command to take effect

sysctl -p

See / proc / sys / fs / aio-max-nr value is changed
cat / proc / sys / fs / aio-max-nr

Restart the MySQL instance

Original link: https://www.cnblogs.com/nb-blog/p/8391601.html

Guess you like

Origin www.cnblogs.com/peitianwang/p/12173242.html