版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/lmocm/article/details/83014404
背景概述: 一台物理服务器,跑了多个实例,如果有一天 mysql 错误日志出现类似告警
OperationalError: (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")
看了数据库mysql 用户相关参数基本没问题,max_connection 也在安全内。
个人猜测也是和系统分配资源有关系,只是这个参数不能确定。
后来看了一下度娘,有人建议在/etc/bashrc 下添加
ulimit -u 65536 (全局限制用户资源分配)。
最后,持续观察。。。