Too many connections

from the Artful MySQL Tips List


Limits on max_connections in MySQL ...

The default max connections = 151

At 214, connections are limited by max open files

At 4,915, connections are limited by systemd max_tasks

Near 8,000, connections are limited by the maximum number of processes as reported by running pgrep -o mysql )/limits

If you needt 10,000 processes, try ...

sudo cat /etc/systemd/system/mysql.service.d/override.conf
[Service]
LimitNOFILE=11000
LimitNPROC=11000
TasksMax=11000
More at http://mysql-nordic.blogspot.com/2019/04/mysql-error-too-many-connections.html



Return to the Artful MySQL Tips page