LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Kernel (https://www.linuxquestions.org/questions/linux-kernel-70/)
-   -   Centos | ERROR (setreuid failed): Resource temporarily unavailable (https://www.linuxquestions.org/questions/linux-kernel-70/centos-%7C-error-setreuid-failed-resource-temporarily-unavailable-4175605726/)

ilesterg 05-11-2017 11:35 AM

Centos | ERROR (setreuid failed): Resource temporarily unavailable
 
Hi all!

Greetings.

There's a script failing with the below error:

Code:

/home/username/script: line XXX: cannot fork [Resource temporarily unavailable]
/var/log/messages:

Code:

May  7 04:12:01 server crond[7814]: (CRON) ERROR (setreuid failed): Resource temporarily unavailable
I was reading setreuid manpage but I can't figure out what resource should be modified for the user running. Any idea what I can check?

Code:

root@server # uname -a
Linux server 2.6.32-504.16.2.el6.x86_64 #1 SMP Tue Mar 10 17:01:00 EDT 2015 x86_64 x86_64 x86_64 GNU/Linux
root@server #

This is a CentOS 6.6 machine.

Thanks.

custangro 05-11-2017 05:32 PM

This is commonly caused by running out of file descriptors.

There are different file descriptor limits.

There is the systems total file descriptor limit, what do you get from the command:

Code:

sysctl fs.file-nr
From this command you will get 3 numbers. First is the number of used file descriptor the second is the number of allocated but not used file descriptor and the last is the system max file descriptor. If either of the first two numbers are new otr at the third you need to increase the number of file descriptors for the system of find out what is consuming them.

Also, you can increase the value of "nproc" parameter for user or all user's in /etc/security/limits.d/90-nproc.conf


All times are GMT -5. The time now is 09:46 AM.