The error is as follows.
Can't create a new thread (errno-1); if you are not out of available memory, you can consult the manual for a possible OS-dependent bug
Cause analysis:
It has nothing to do with MySQL itself
The number of operating system connections is too small. (For example, centos 6 has only 1024 max user processes by default. When mysql process is greater than this value, the problem of Can't create a new thread will occur)
Solution 1
Restart the mysql database.
Solution 2: Long-Term Effectiveness
Handling of excessive connections:
Ulimit-
View max user processes
If this value is relatively small, when the number of processes in mysql exceeds this number, the corresponding title error will be held.
Modification method:
Vi/etc/security/limits. d/90-nproc.conf
# Change:
-Nproc 65536
Or:
Vi/etc/bashrc
Add:
Ulimit-u 65536
Then exit the current session.