How to change default number of max process per user in linux

48,379

The problem here is that you specify "hard" in

malintha hard nproc 10000

hard is the "max" limit, and soft is the default. So you can leave it as hard and then use ulimit -u 1000 and processes after that point, for that bash shell, will have the increased limit, or use soft, then it will be the default for all processes started by your user [remember to logout and re-login with each change].

For those looking to try and figure out why they are limited to [for instance] 1024 max theads for a given user, also note that it reads the /etc/security/limits.conf file and other /etc/security/limits.d/* files.

Share:
48,379
Malintha
Author by

Malintha

I am a software engineer in WSO2 Inc.

Updated on July 05, 2022

Comments

  • Malintha
    Malintha almost 2 years

    I have faced a problem with the changing the default number of processes for user in linux. I have tried to edit /etc/security/limits.conf file with adding the following line.

    malintha hard nproc 10000
    

    After I saving it I tried following command on terminal

    ulimit -u
    

    and it give the previous value (1024) , But not the updated value. How can I fix this permanently ?

    this is my limits.conf file