数据库版本: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

主要问题是系统资源限制导致,可通过修改:
[root@yoon ~]# 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  即可。 

 
 

Resource temporarily unavailable的更多相关文章

  1. -bash: fork: retry: Resource temporarily unavailable

    登陆不了服务器The server refused to start a shell. 登陆服务器后执行ls命令报错:   1 2 $ls -bash: fork: retry: Resource t ...

  2. 近期编程问题——read:resource temporarily unavailable

    EAGAIN错误 出现问题:read:resource temporarily unavailable 原因:这种错误一般出现宰非阻塞的socket编程中,资源暂时不可用. 我的解决方法:囧,后来改成 ...

  3. 转connect() to unix:/var/run/php-fpm.sock failed (11: Resource temporarily unavailable)

    网站常出现502 bad gateway,程序没有问题. 根据nginx日志:connect() to unix:/var/run/php-fpm.sock failed (11: Resource ...

  4. [转] - linux下使用write\send发送数据报 EAGAIN : Resource temporarily unavailable 错

    linux下使用write\send发送数据报 EAGAIN : Resource temporarily unavailable 错 首先是我把套接字设置为异步的了,然后在使用write发送数据时采 ...

  5. su: cannot set user id: Resource temporarily unavailable

    今天R&D所在主机出现su: cannot set user id: Resource temporarily unavailable资源不可用报错,直接通过其他机器ssh huyuh@xxx ...

  6. Samba & Nginx - Resource temporarily unavailable

    先说说本人的开发环境:Win7 + Editplus + VMware(Centos+Samba+Nginx).用Samba在Centos上把web文件夹(如www)共享,然后在Win7上訪问这个文件 ...

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

    -bash:fork:Resource temporarily unavailable的问题   出现这个问题的原因是linux用户的连接数设置的太小,只要修改max user processes就可 ...

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

    /*********************************************************************  * Author  : Samson  * Date   ...

  9. error=11, Resource temporarily unavailable

    问题1:Cannot run program "/bin/ls": error=11, Resource temporarily unavailable 1 15/04/22 14 ...

随机推荐

  1. 《UNIX环境高级编程》学习心得 四 文件I/O(一)

    这里说的文件I/O是相对标准I/O来说的.主要介绍在UNIX系统中常用的五个文件I/O函数:open.read.write.lseek.以及close. 一.open和opennat #include ...

  2. LeetCode 55

    Jump Game Given an array of non-negative integers, you are initially positioned at the first index o ...

  3. HTML标签大全

    HTML标签解释大全 一.HTML标记 标签:!DOCTYPE 说明:指定了 HTML 文档遵循的文档类型定义(DTD). 标签:a 说明:标明超链接的起始或目的位置. 标签:acronym 说明:标 ...

  4. 写过的HTML标签(一)

    HTML >   标题显示字体大小为<h1>. HTML 段落是通过标签 <p> 来定义的. HTML 链接是通过标签 <a> 来定义的.  实例: < ...

  5. LINQ to SQL 语句(2)之 Select/Distinct

    LINQ to SQL 语句(2)之 Select/Distinct [1] Select 介绍 1 [2] Select 介绍 2 [3] Select 介绍 3 和  Distinct 介绍 Se ...

  6. Part 11 string functions in sql server

    Built in string functions in sql server 2008 LEFT, RIGHT, CHARINDEX and SUBSTRING functions in sql s ...

  7. Android之图片滑动与显示

    先在Transitions中插入ImageSwitcher package com.example.Galleryphotoshow; import com.example.Galleryphotos ...

  8. 通过带参数的Sql语句来实现模糊查询(多条件查询)

    #region 通过带参数的Sql语句来实现模糊查询(多条件查询) StringBuilder sb = new StringBuilder("select * from books&quo ...

  9. 用实体框架搭建MVC程序框架(全部)

    第一步:1.新建项目 2.新建domain类库 3.新建Data类库 4.为上面的1.2.3添加实体框架nuget包.(可以右键管理nuget包来查找entityframework,当然也可以通过程序 ...

  10. javascript之正则表达式总结

    了解RegExp类型: ECMAScript通过RegExp类型来支持正则表达式. var expression=/pattern/flags; 正则表达式的模式(pattern)部分: 可以是任何简 ...