美文网首页
Increase Open Files Limit in Ubu

Increase Open Files Limit in Ubu

作者: SeanC52111 | 来源:发表于2021-01-19 15:32 被阅读0次

    Increase per-user Limit

    You can define per-user open file limit on a Debian based Linux system. To set per-user limit, edit /etc/security/limits.conf file in a text editor.

    sudo vim /etc/security/limits.conf
    

    Add the following values in file:

    *    soft     nproc          65535
    *    hard     nproc          65535
    *    soft     nofile         65535
    *    hard     nofile         65535
    username     soft     nproc          200000
    username     hard     nproc          200000
    username     soft     nofile         200000
    username     hard     nofile         200000
    

    Here we specifying separate limits which are 200000 for the user “username” and 65535 will be applied for the rest of the users. You can change these values per your requirements.

    After that enable the pam_limits as followings:

    sudo vim /etc/pam.d/common-session
    

    Add the following line:

    session required pam_limits.so
    

    相关文章

      网友评论

          本文标题:Increase Open Files Limit in Ubu

          本文链接:https://www.haomeiwen.com/subject/ddzqzktx.html