mysqldump: Got error: 1135: Can't create a new thread (errno 11); if you are not out of available memory, you can consult the manual for a possible OS-dependent bug when trying to connect 解决办法

时间:2022-03-30 00:06:28
在进行数据库备份的时候发现服务器报 mysqldump: Got error: 1135: Can't create a new thread (errno 11); if you are not out of available memory, you can consult the manual for a possible OS-dependent bug when trying to connect  错误
 
mysqldump: Got error: 1135: Can't create a new thread (errno 11); if you are not out of available memory, you can consult the manual for a possible OS-dependent bug when trying to connect 解决办法
,出现原因是服务器的连接数太多了,当mysql的连接数大于默认数值(1024)时,就会出现这个错误,需要增加服务器的最大连接数,方法如下:
打开  /etc/security/limits.conf
增加两行参数: 
* soft nofile 65535
* hard nofile 409600
 
为了避免重启服务器可以在命令行中执行:
ulimit -u 65535
mysqldump: Got error: 1135: Can't create a new thread (errno 11); if you are not out of available memory, you can consult the manual for a possible OS-dependent bug when trying to connect 解决办法
 
验证下mysql的最大连接数
cat /proc/`pidof mysqld`/limits | egrep "(processes|files)"
Max processes             65535                65535                processes
Max open files            65535                409600               files     
 
 
mysqldump: Got error: 1135: Can't create a new thread (errno 11); if you are not out of available memory, you can consult the manual for a possible OS-dependent bug when trying to connect 解决办法