← Back to team overview

group.of.nepali.translators team mailing list archive

[Bug 1721546] Re: max open files limit prevents max_connections over 214 on systemd

 

Ubuntu 17.10 (Artful Aardvark) has reached end of life, so this bug will
not be fixed for that specific release.

** Changed in: mysql-5.7 (Ubuntu Artful)
       Status: Confirmed => Won't Fix

-- 
You received this bug notification because you are a member of नेपाली
भाषा समायोजकहरुको समूह, which is subscribed to Xenial.
Matching subscriptions: Ubuntu 16.04 Bugs
https://bugs.launchpad.net/bugs/1721546

Title:
  max open files limit prevents max_connections over 214 on systemd

Status in mysql-5.7 package in Ubuntu:
  Fix Released
Status in mysql-5.7 source package in Xenial:
  Confirmed
Status in mysql-5.7 source package in Zesty:
  Confirmed
Status in mysql-5.7 source package in Artful:
  Won't Fix

Bug description:
  With the default mysql-server installation on systemd versions of
  Ubuntu (xenial and above) setting max_connections to more than 214
  will not work, due to systemd imposed limits:

  root@juju-c2777d-default-1:~# grep max_connections /etc/mysql/mysql.conf.d/mysqld_settings_charm.cnf 
  max_connections = 5500

  root@juju-c2777d-default-1:~# grep max_connections /var/log/mysql/error.log 
  2017-10-05T12:41:16.958726Z 0 [Warning] Changed limits: max_connections: 214 (requested 5500)
  2017-10-05T12:41:19.198391Z 0 [Warning] Changed limits: max_connections: 214 (requested 5500)

  root@juju-c2777d-default-1:~# grep open_files /var/log/mysql/error.log 
  2017-10-05T12:41:11.824199Z 0 [Warning] Changed limits: max_open_files: 1024 (requested 5000)
  2017-10-05T12:41:16.958668Z 0 [Warning] Changed limits: max_open_files: 1024 (requested 27500)
  2017-10-05T12:41:19.198342Z 0 [Warning] Changed limits: max_open_files: 1024 (requested 27500)

  
  As can be seen, mysql tries to increase the open files limit to 27500, but due to systemd imposed limitation it fails to do so, and then it selects maximum possible number of connections, based on open files limit.

  
  This was the problem with default setups with pre-systemd installs, but upstart allowed mysqld to change the limit of open files before mysqld drops privileges from root to mysql system user.
  Even before that, on sysV init, there was a wrapper, mysqld_safe, which run as root, used ulimit to change the open files limit and then started mysqld as mysql user.

  
  Would it make sense to ship mysql-server packages with mysql.service unit files so that there is no limit for open files, or so that open files limit is substantially higher than 1024?

  This was all discussed when Ubuntu 15.10 came out, for mysql-5.6, in
  bug LP: #1434758, but I am still bringing this up for more recent
  mysql versions.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/mysql-5.7/+bug/1721546/+subscriptions