Installation of templates/packages fails on MySQL 5.5 service startup in Debian 7.0 container

Created:

2016-11-16 13:19:57 UTC

Modified:

2017-08-16 16:36:54 UTC

0

Was this article helpful?


Have more questions?

Submit a request

Installation of templates/packages fails on MySQL 5.5 service startup in Debian 7.0 container

Applicable to:

  • Plesk for Linux
  • Plesk 11.x for Linux

Symptoms

During installation of application templates or packages to a Debian 7.0 based container, the operation might fail on the MySQL 5.5 server. Here is an example for the container #9200:

~# vzpkg install -q 9200 .pp11.5-webmail .pp11.5-webhosting-addons .pp11.5-watchdog .pp11.5-spamassassin .pp11.5-postfix .pp11.5-php5 .pp11.5-bind .pp11.5-panel-addons .pp11.5-migration .pp11.5-mailman .pp11.5
...
Setting up mysql-server-5.5 (5.5.31+dfsg-0+wheezy1) ...
Stopping MySQL database server: mysqld.
Starting MySQL database server: mysqld . . . . . . . . . . . . . . failed!
invoke-rc.d: initscript mysql, action "start" failed.
vzexec exited with code 1
dpkg: error processing mysql-server-5.5 (--configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
mysql-server-5.5
E: Sub-process /usr/bin/dpkg returned an error code (1)
Error: /usr/bin/apt-get failed, exitcode=100
~#

The log file has the following error about MySQL startup in the container #9200 with the hostname "paraplesk":

~# tail -20 /vz/root/9200/var/log/syslog
...
Aug 6 00:12:05 paraplesk mysqld: 130806 0:12:05 InnoDB: Warning: io_setup() failed with EAGAIN. Will make 5 attempts before giving up.
Aug 6 00:12:05 paraplesk mysqld: InnoDB: Warning: io_setup() attempt 1 failed.
Aug 6 00:12:06 paraplesk mysqld: InnoDB: Warning: io_setup() attempt 2 failed.
Aug 6 00:12:06 paraplesk mysqld: InnoDB: Warning: io_setup() attempt 3 failed.
Aug 6 00:12:07 paraplesk mysqld: InnoDB: Warning: io_setup() attempt 4 failed.
Aug 6 00:12:07 paraplesk mysqld: InnoDB: Warning: io_setup() attempt 5 failed.
Aug 6 00:12:08 paraplesk mysqld: 130806 0:12:08 InnoDB: Error: io_setup() failed with EAGAIN after 5 attempts.
Aug 6 00:12:08 paraplesk mysqld: InnoDB: You can disable Linux Native AIO by setting innodb_use_native_aio = 0 in my.cnf
...

Cause

MySQL 5.5 in Debian 7.0 supports asynchronous input-output operations and reserves about 2700 handles for such requests. The kernel has a limit for such requests, and if the limit is reached during MySQL service startup in a container, then the issue occurs.

Resolution

The default value allows you to run about 25 instances of MySQL 5.5, which is why the issue occurs when a few containers are created and started successfully.

To fix the situation and have the setting preserved across reboots, the following command should be executed on the hardware server:

[root@node ~]# sysctl -w fs.aio-max-nr=1048576 >> /etc/sysctl.conf

Also, the feature request PCLIN-32027 has been submitted to configure this variable during installation of PVC/PCS in the future.

Have more questions? Submit a request
Please sign in to leave a comment.