Closed nkadel-skyhook closed 4 years ago
A better location for the fix is
The fix is described well at:
An even better location for CentOS or RHEL 7 is:
Marking stale due to inactivity. Remove stale label or comment or this will be closed in 7 days. Alternatively drop by the #sous-chefs channel on the Chef Community Slack and we'll be happy to help! Thanks, Sous-Chefs.
Closing due to inactivity. If this is still an issue please reopen or open another issue. Alternatively drop by the #sous-chefs channel on the Chef Community Slack and we'll be happy to help! Thanks, Sous-Chefs.
Cookbook version
8.5.1
Chef-client version
12.10.24
Platform Details
CentOS 7.4, MySQL 5.7.19
Scenario:
Set max_connections=10000 in MySQL configuration files. Systemd restart resets max_connect_errors to 241.
Steps to Reproduce:
Use systemd init tools for MySQL. Set "max_connections = 10000" in /etc/mysql-default/conf.d/max_connections.cnf. Restart mysql. Run "mysql -A -s -s -e 'show variables;' | grep max_connections"
Expected Result:
max_connections = 10000
Actual Result:
max_connections = 241
Proposed Fix:
The fix is to activate something like this in the mysql-[instance].service file [Service] LimitNOFILE=20000
systemd is, once again trying to take over system management in ways that other tools such as sysctl do better. And the defaults are set much too small.