• jenkins服务器进程限制配置


    当应用程序占满进程数后,则会报错如下

    Resource temporarily unavailable

    新用户的进程数限制一般都是在2048或者4096。

    解决方案

    1、使用root用户登陆,进入到/etc/security/limits.d/:

    zhangsan@ubuntu-server: cd /etc/security/limits.d

    2、检查该文件夹下有没有文件,如没有,新建

    touch 20-nproc.conf


    3、编辑20-nproc.conf,添加以下内容:

    * soft nproc 4096
    root soft nproc unlimited
    zhangsan     soft nproc 60000

    4、编辑/etc/security/limits.conf,添加以下内容:

    “username” soft nproc 60000
    “username” hard nproc 65535
    “username” soft nofile 60000
    “username” hard bofile 65535

    添加后文件为:
    * soft nofile 100001
    * hard nofile 100002
    * soft nproc 60000
    * hard nproc 65535
    root soft nofile 100001
    root hard nofile 100002
    root soft nproc 60000
    root hard nproc 65535

    nproc:表示max number of processes
    nofile:表示max number of open file descriptors
    hard/soft:soft是一个警告值,而hard则是一个真正意义的阀值,超过就会报错。
    username: 想使所有用户就用'*' 代替

    5、再次切换到username用户,执行ulimit -a:
    zhangsan@ubuntu-server:~/.ssh$ 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) 31663
    max locked memory (kbytes, -l) 16384
    max memory size (kbytes, -m) unlimited
    open files (-n) 100001
    pipe size (512 bytes, -p) 8
    POSIX message queues (bytes, -q) 819200
    real-time priority (-r) 0
    stack size (kbytes, -s) 8192
    cpu time (seconds, -t) unlimited
    max user processes (-u) 60000
    virtual memory (kbytes, -v) unlimited
    file locks (-x) unlimited

    三十六般武艺,七十二般变化,修练出个人品牌并发出光芒
  • 相关阅读:
    oracle恢复被覆盖的存储过程
    POJ 2478 Farey Sequence
    java不求有功,但求无过—异常处理
    图论-树的最大路
    MP3的频率、比特率、码率与音质的关系
    基于Lucene3.5.0怎样从TokenStream获得Token
    Groovy新手教程
    Binder机制1---Binder原理介绍
    UVA
    Hibernate Criterion
  • 原文地址:https://www.cnblogs.com/deeptester-vv/p/14266465.html
Copyright © 2020-2023  润新知