Saturday, September 22, 2018

Increase MySQL maximum connection limit

Increase MySQL maximum connection limit

2018-09-22T15:00:42.130042Z 0 [Warning] Changed limits: max_open_files: 1024 (requested 5000)
2018-09-22T15:00:42.130087Z 0 [Warning] Changed limits: max_connections: 214 (requested 500)
2018-09-22T15:00:42.130091Z 0 [Warning] Changed limits: table_open_cache: 400 (requested 2000)

Note: Ubuntu has moved from Upstart to Systemd in version 15.04 and no longer respects the limits in /etc/security/limits.conf for system services. These limits now apply only to user sessions.

# mkdir /etc/systemd/system/mysql.service.d
# vim /etc/systemd/system/mysql.service.d/override.conf


# systemctl daemon-reload
# systemctl restart mysql


No comments: