Re: [ERROR] Can't create thread to handle request (errno= 11) when number of processes reaches 512 (MySQL 5.6.40)
With the help of Robin Knapp, one of my Google+ followers (https://plus.google.com/+ArtemRussakovskii/posts/dd8ot2HvPju), I'm going to answer my own thread, in case someone ever runs into the same issue again.
The culprit is systemd's TasksMax setting, which was set to 512 at some point.
systemctl status mysql
● mysql.service - MySQL server
Loaded: loaded (/usr/lib/systemd/system/mysql.service; enabled; vendor preset: disabled)
Active: active (running) since Tue 2018-05-01 13:38:21 PDT; 22h ago
Main PID: 32455 (mysqld)
***Tasks: 121 (limit: 512)***
CGroup: /system.slice/mysql.service
└─32455 /usr/sbin/mysqld --defaults-file=/etc/my.cnf --user=mysql
https://www.suse.com/releasenotes/x86_64/SUSE-SLES/12-SP2/#fate-320358
TasksMax=N¶
Specify the maximum number of tasks that may be created in the unit. This ensures that the number of tasks accounted for the unit (see above) stays below a specific limit. This either takes an absolute number of tasks or a percentage value that is taken relative to the configured maximum number of tasks on the system. If assigned the special value "infinity", no tasks limit is applied. This controls the "pids.max" control group attribute. For details about this control group attribute, see pids.txt.
Implies "TasksAccounting=true". The system default for this setting may be controlled with DefaultTasksMax= in systemd-system.conf(5).
I added TasksMax=infinity to /usr/lib/systemd/system/mysql.service under the [Service] group, and now the limit is gone:
systemctl status mysql
● mysql.service - MySQL server
Loaded: loaded (/usr/lib/systemd/system/mysql.service; enabled; vendor preset: disabled)
Active: active (running) since Wed 2018-05-02 12:22:13 PDT; 16s ago
Main PID: 20359 (mysqld)
***Tasks: 46***
CGroup: /system.slice/mysql.service
└─20359 /usr/sbin/mysqld --defaults-file=/etc/my.cnf --user=mysql
--------------
https://beerpla.net,
https://www.androidpolice.com,
https://www.apkmirror.com