5

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

3
  • 2
    Did you logout and relogin? Commented Oct 22, 2013 at 9:29
  • Well, ulimit is shell specific OTOH, changing /etc/security/limits.conf is related to PAM, see man pam for details. Changing /etc/security/limits.conf shouldn't effect ulimit. Commented Oct 22, 2013 at 9:50
  • This article answers your question: cyberciti.biz/tips/linux-limiting-user-process.html Commented Oct 22, 2013 at 12:21

2 Answers 2

5

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.

Sign up to request clarification or add additional context in comments.

Comments

0

Editing the file requires a server reboot, you can use a simpler way:

chuser nofiles=10000 malintha 

disconnect from you console and reconnect again using the username malintha. Use ulimit -n and the output should now be 10000.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.