How to Set Limits on User Running Processes in Linux

If You Appreciate What We Do Here On TecMint, You Should Consider:

  1. Stay Connected to: Twitter | Facebook | Google Plus
  2. Subscribe to our email updates: Sign Up Now
  3. Get your own self-hosted blog with a Free Domain at ($3.45/month).
  4. Become a Supporter - Make a contribution via PayPal
  5. Support us by purchasing our premium books in PDF format.
  6. Support us by taking our online Linux courses

We are thankful for your never ending support.

Marin Todorov

I am a bachelor in computer science and a Linux Foundation Certified System Administrator. Currently working as a Senior Technical support in the hosting industry. In my free time I like testing new software and inline skating.

Your name can also be listed here. Got a tip? Submit it here to become an TecMint author.

RedHat RHCE and RHCSA Certification Book
Linux Foundation LFCS and LFCE Certification Preparation Guide

You may also like...

7 Responses

  1. ramu says:

    Hi, why it should be 16384 only? even i have same issue. I tried with 4096 it is not resolving the issue.

  2. Deepa says:

    I am able to change the nproc for additional users using /etc/security/limits.conf but some how root users nproc value set is 150. When logged as root and execute ulimit -n I get the value 150.

    How can I change root users nproc value?

    • Ravi Saive says:

      @Deepa,

      The system wide configuration file /etc/security/limits.d/90-nproc.conf (RHEL6) and /etc/security/limits.d/20-nproc.conf (RHEL7) specifies the default nproc limits as:

      *            soft    nproc     1024
      root       soft    nproc     unlimited
      
      • Deepa says:

        Thank you, We are Using RHEL 6. Checked the /etc/limits. d/90-nproc.conf this file has same values as you mentioned. However when I run ulimit – u as root or any other user get value 150.

        In file /etc/security/limits.conf file I commented line * hard nproc 150 which was there before. I logged out restarted httpd still same value is coming. How reset default nproc value for root and other users. Please help

  3. Jalal Hajigholamali says:

    Hi,

    Thanks a lot.

  4. Marin Todorov says:

    Can you actually see what processes are being executed? Share those with so we can have a better understanding of the issue. Also my suggestion is to check the IO utilisation as well

  5. Sandeep Singh Rawat says:

    Hi Ravi,

    I am facing the issue with oracle user, user complains for slowness in Apache. while slowness issue I am not able to login with oracle users. It is giving error like resources are in use. Every time i have to restart my network services. I have set my oracle user limits in /etc/security/limits.conf as oracle soft nproc 16384
    oracle hard nproc 16384
    oracle soft nofile 4096
    oracle hard nofile 65536
    oracle soft stack 10240.

    Please share if you can help me.

Got something to say? Join the discussion.

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.