LinuxレポートResource temporarily unavailable問題解決策

1675 ワード

アプリケーションがプロセス数を満たすと、次のようにエラーが表示されます.
Resource temporarily unavailable
新規ユーザのプロセス数制限は、一般に2048または4096である.ソリューション
   root    ,   /etc/security/limits.d/:

    [root@centos ~]$ cd /etc/security/limits.d/

    [root@centos limits.d]$ ll

    total 8

    -rw-r--r-- 1 root root 195 Aug 29 2017 20-nproc.conf
  20-nproc.conf:
    [root@centos limits.d]$ vim 20-nproc.conf
         
        “username” soft nproc 60000
               :

        * soft nproc 4096

        root soft nproc unlimited

        “username” soft nproc 60000

  /etc/security/limits.conf,      :

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

nproc:  max number of processes
nofile:  max number of open file descriptors
hard/soft:soft      , hard           ,      。

     username  ,  ulimit -a:

    [username@VM_3_220_centos ~]$ 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) 7271

    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) 8192

    cpu time (seconds, -t) unlimited

    max user processes (-u) 65535

    virtual memory (kbytes, -v) unlimited

    file locks (-x) unlimited

    

————————————————著作権声明:本文はCSDNブロガーの「憶網」のオリジナル文章で、CC 4.0 BY-SA著作権協定に従い、原文の出典リンクと本声明を転載してください.テキストリンク:https://blog.csdn.net/qq_24027457/article/details/82906143