Resource temporarily unavailable

数据库版本:5.5.14

操作系统版本:contos 6.3

服务器256G内存,安装90个实例。通过脚本启动90个mysql数据库实例,会有几个实例无法启动,进程启动后直接被杀死。查看mysql日志如下:

140729 10:32:34 [ERROR] Can‘t create thread to kill server
140729 10:46:35 mysqld_safe Starting mysqld daemon with databases from /export/data/mysql/data3363
140729 10:46:36 InnoDB: The InnoDB memory heap is disabled
140729 10:46:36 InnoDB: Mutexes and rw_locks use GCC atomic builtins
140729 10:46:36 InnoDB: Compressed tables use zlib 1.2.3
140729 10:46:36 InnoDB: Initializing buffer pool, size = 1.0G
140729 10:46:36 InnoDB: Completed initialization of buffer pool
140729 10:46:36 InnoDB: highest supported file format is Barracuda.
InnoDB: Error: pthread_create returned 11
140729 10:46:37 mysqld_safe mysqld from pid file /export/data/mysql/data3363/mysql.pid ended
140729 10:48:26 mysqld_safe Starting mysqld daemon with databases from /export/data/mysql/data3363
140729 10:48:26 [ERROR] setuid: Resource temporarily unavailable
140729 10:48:26 [ERROR] Aborting

主要问题是系统资源限制导致,可通过修改:
[[email protected] ~]# ulimit -a
core file size          (blocks, -c) 0
data seg size           (kbytes, -d) unlimited
scheduling priority             (-e) 0
file size               (blocks, -f) unlimited
pending signals                 (-i) 2066313
max locked memory       (kbytes, -l) 64
max memory size         (kbytes, -m) unlimited
open files                      (-n) 65535
pipe size            (512 bytes, -p) 8
POSIX message queues     (bytes, -q) 819200
real-time priority              (-r) 0
stack size              (kbytes, -s) 10240
cpu time               (seconds, -t) unlimited
max user processes              (-u) 1024
virtual memory          (kbytes, -v) unlimited
file locks                      (-x) unlimited

可是ulimit修改后,不是永久性的。网上说在vi /etc/security/limits.conf下添加如下:
* soft nofile 65535
* hard nofile 65535
* soft nproc 65535
* hard nproc 65535

但是最终发现,也不是永久性的。而是要在此参数下修改,vi /etc/security/limits.d/90-nproc.conf
*          soft    nproc     65536
并手动ulimit-u 65535  即可。

时间: 2024-11-10 01:21:51

Resource temporarily unavailable的相关文章

su: cannot set user id: Resource temporarily unavailable

今天R&D所在主机出现su: cannot set user id: Resource temporarily unavailable资源不可用报错,直接通过其他机器ssh [email protected]时,提示 Write failed: Broken pipe. 进行排查发现机器内存使用已经没有了,进行临时的内存回收操作:sync ; sync 将内存数据刷新到磁盘 echo 3 > /proc/sys/vm/drop_caches 内存释放echo 0 > /proc/sys

E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable)

出现这个问题的原因可能是有另外一个程序正在运行,导致资源被锁不可用.而导致资源被锁的原因,可能是上次安装时没正常完成,而导致出现此状况. 解决方法:输入以下命令 sudo rm /var/cache/apt/archives/lock sudo rm /var/lib/dpkg/lock 之后再安装想装的包,即可解决 今天玩ubuntu的时候,在弄更新源的时候,突然出现以下错误: [1]+ Stopped                 sudo apt-get update[email pro

E: 无法获取锁 /var/lib/apt/lists/lock - open (11: Resource temporarily unavailable)解决方法

/********************************************************************* * Author  : Samson * Date    : 09/20/2014 * Test platform: *              Linux ubuntu 3.2.0-58-generic-pae *              GNU bash, version 4.2.39 * *****************************

E: 无法获得锁 /var/lib/apt/lists/lock - open (11: Resource temporarily unavailable)解决方法

/********************************************************************* * Author  : Samson * Date    : 09/20/2014 * Test platform: *              Linux ubuntu 3.2.0-58-generic-pae *              GNU bash, version 4.2.39 * *****************************

Linux # Could not get lock /var/cache/apt/archives/lock - open (11: Resource temporarily unavailable)

參照 http://blog.csdn.net/dengroj2009/article/details/4636456 中方案二,問題解決. 不過,感覺博主記錄問題方式很規範,記錄下. 記錄整個筆記的流程:事件/錯誤/解決方案/步驟/原因總結 Linux # Could not get lock /var/cache/apt/archives/lock - open (11: Resource temporarily unavailable),布布扣,bubuko.com Linux # Cou

(八)ubuntu安装软件提示:Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable)

question: [email protected]:/usr/src/Linux-headers-3.5.0-23-generic$ sudo apt-get install cheese [sudo] password for ubuntu: E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable)E: Unable to lock the administration di

Resource temporarily unavailable用户的连接数设置的太小

-bash:fork:Resource temporarily unavailable的问题 出现这个问题的原因是linux用户的连接数设置的太小,只要修改max user processes就可以    www.2cto.com 设置各linux 用户的最大进程数,下面我把某linux用户的最大进程数设为10000个: ulimit -u 10000 ulimit -a core file size          (blocks, -c) 0 data seg size          

-bash: fork: retry: Resource temporarily unavailable;centos6.5

Last login: Wed Jun 18 14:04:11 2014 from 1.1.1.135 -bash: fork: retry: Resource temporarily unavailable -bash: fork: retry: Resource temporarily unavailable -bash: fork: retry: Resource temporarily unavailable -bash: fork: retry: Resource temporaril

修改linux用户的可以打开的最大文件数和进程数(fork: retry: Resource temporarily unavailable)

今天,jenkins发布应用时,遇到一个报错,如下: /etc/profile:fork: retry: Resource temporarily unavailable Google了一下,网上大家大部分说原因可能是,用户的进程数或者文件打开数,达到了限制.按照这个思路,我去查问题,发现用户的进程数为200多,文件打开数为1300多 而通过ulimit–a,看到 openfiles                      (-n) 1024 maxuser processes