Networking

Unix and Linux network configuration. Multiple network interfaces. Bridged NICs. High-availability network configurations.

Applications

Reviews of latest Unix and Linux software. Helpful tips for application support admins. Automating application support.

Data

Disk partitioning, filesystems, directories, and files. Volume management, logical volumes, HA filesystems. Backups and disaster recovery.

Monitoring

Distributed server monitoring. Server performance and capacity planning. Monitoring applications, network status and user activity.

Commands & Shells

Cool Unix shell commands and options. Command-line tools and application. Things every Unix sysadmin needs to know.

Home » Processes

Upping the Soft nproc Limit

Submitted by on October 5, 2015 – 11:12 am

This is just a quick note to myself about increasing the “soft nproc” value. On one of the RHEL 6 Tomcat servers I got the following error when trying to “su – tomcat”:

su: cannot set user id: Resource temporarily unavailable

The issue is likely caused by the tomcat user hitting the soft process limit. Step one is to count the number of processes running under tomcat UID:
root@devtomcat01# ps -eLF | grep [t]omcat | wc -l
1024

Immediately, the 1024 value looks suspicious as it is the common default soft nproc limit. You can check limits.conf:
grep nproc /etc/security/limits.conf

I found nothing of interest there. The more promising location to check is /etc/security/limits.d/90-nproc.conf:
root@devtomcat01# grep nproc /etc/security/limits.d/90-nproc.conf
*          soft    nproc     1024
root       soft    nproc     unlimited

And there it is: the default soft nproc limit for all users (except root) is 1024. Change that to 131072 and save the file. No reboots or restarts are needed. The problem should be resolved immediately.

Print Friendly, PDF & Email

Leave a Reply