• 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

    主要问题是系统资源限制导致,可通过修改:
    [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  即可。 
     
     
  • 相关阅读:
    Java变量相关
    centos 7安装Docker
    字符串匹配的KMP算法
    [转]关于”算法工程师/机器学习工程师”的笔试和面试总结
    希腊字母与拉丁字母的对应
    决策树和基于决策树的集成方法(DT,RF,GBDT,XGB)复习总结
    机器学习总结
    bat批处理的注释语句
    Python中使用pickle持久化对象
    怎样用通俗的语言解释REST,以及RESTful?
  • 原文地址:https://www.cnblogs.com/hankyoon/p/5169613.html
Copyright © 2020-2023  润新知