Showing entries 1 to 2
Displaying posts with tag: max_connections (reset)
Max_connections 214 4.15.0-46-generic #49-Ubuntu


So the issue of max_connections dropping from the value set in your my.cnf file down to 214 has been around for a little while on Ubuntu.

As an example, it was noted here back in 2015



I ran into this again recently and was resolved with the following steps.


# cp /lib/systemd/system/mysql.service /etc/systemd/system/
# cd /etc/systemd/system/
# vi mysql.service

LimitNOFILE=infinity
LimitMEMLOCK=infinity

# systemctl daemon-reload
# systemctl restart mysql


Once those steps completed the MySQL connections were stable at the given parameter in the my.cnf file. 

MySQL file limit, table cache and max_connections

MySQL variables open_files_limit, table_open_cache and max_connections are
inter-related, and this is for obvious reasons: all deal with file descriptors
one way or another.

If one of the value is provided but others are left out, mysqld calculates
others using a formula and in some cases, emits a warning if not possible.

The whole calculation behind obtaining the final file descriptor limit is a bit
byzantine and is as follows (for Linux):

EDIT: This applies to MySQL 5.5, in 5.6, as Daniël in comments pointed out,
few things have changed, check comment for details. I will probably make a
followup post on the differences.

  1. First it tries to calculate a minimum requirement based on max_connections
[Read more]
Showing entries 1 to 2