zoukankan      html  css  js  c++  java
  • 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  即可。 
     
     
  • 相关阅读:
    【推荐】英国金融时报推荐的数据可视化图表分类图
    华为方舟编译器开源官网正式上线
    PyTorch官方教程中文版
    《一张图看懂华为云BigData Pro鲲鹏大数据解决方案》
    区块链学习笔记:DAY05 如何使用公有云区块链服务
    python一行写不下,变多行
    python 多窗口编辑
    ant的设置properties
    java的输出类
    python的IndentationError: unexpected indent python
  • 原文地址:https://www.cnblogs.com/hankyoon/p/5169613.html
Copyright © 2011-2022 走看看