-bash: fork: retry: No child processes

zye

Well-Known Member
Dec 6, 2002
117
4
168
hi

i have 1 account having problem with ssh

as soon as i log into users account with username i get

bash: fork: retry: No child processes
bash: fork: retry: No child processes
bash: fork: retry: No child processes
bash: fork: retry: No child processes
bash: fork: Resource temporarily unavailable


user has 79 processes running / mainly IMAP maybe 2 processes are http realated

if i do ulimit -a i get

max user processes (-u) 65

inow how can i change this value to a higher

strange thing is if i su into user from root console i get a different value
max user processes (-u) 75

how do i chnage the limit ?

it is definitely this limit because if i kill all user processes i dont get any errors in the console!
 

zye

Well-Known Member
Dec 6, 2002
117
4
168
i already changed the values in
/etc/profile.d/limits.csh

but there is NO change - still same limits

server has no problem with ram
free -m
total used free shared buff/cache available
Mem: 64145 28264 1839 3177 34041 30886


CLOUDLINUX 7.3 x86_64
3.10.0-427.18.2.lve1.4.24.el7.x86_64 #1 SMP Tue Oct 25 17:18:26 EDT 2016 x86_64 x86_64 x86_64 GNU/Linux




#cPanel Added Limit Protections -- BEGIN
setenv LIMITUSER $USER
if ( -e /usr/bin/whoami ) then
setenv LIMITUSER `whoami`
endif
if ( "$LIMITUSER" != "root" ) then
limit descriptors 2048
limit maxproc 121
limit memoryuse 200000
limit datasize 200000
limit stacksize 8192
limit coredumpsize 200000
else
limit descriptors 4096
limit maxproc 14335
limit memoryuse unlimited
limit datasize unlimited
limit stacksize 8192
limit coredumpsize 1000000
endif
#cPanel Added Limit Protections -- END
 

SysSachin

Well-Known Member
Aug 23, 2015
604
48
28
India
cPanel Access Level
Root Administrator
Twitter
Hello,

To change the maximum number of processes value you have to edit file /etc/security/limits.conf

If you are not sure then please contact to your system admin.
 

zye

Well-Known Member
Dec 6, 2002
117
4
168
there is no such limit there


nano /etc/security/limits.conf
GNU nano 2.3.1 File: /etc/security/limits.conf

# - data - max data size (KB)
# - fsize - maximum filesize (KB)
# - memlock - max locked-in-memory address space (KB)
# - nofile - max number of open file descriptors
# - rss - max resident set size (KB)
# - stack - max stack size (KB)
# - cpu - max CPU time (MIN)
# - nproc - max number of processes
# - as - address space limit (KB)
# - maxlogins - max number of logins for this user
# - maxsyslogins - max number of logins on the system
# - priority - the priority to run user process with
# - locks - max number of file locks the user can hold
# - sigpending - max number of pending signals
# - msgqueue - max memory used by POSIX message queues (bytes)
# - nice - max nice priority allowed to raise to values: [-20, 19]
# - rtprio - max realtime priority
#
#<domain> <type> <item> <value>
#

#* soft core 0
#* hard rss 10000
#@student hard nproc 20
#@faculty soft nproc 20
#@faculty hard nproc 50
#ftp hard nproc 0
#@student - maxlogins 4

# End of file
 

zye

Well-Known Member
Dec 6, 2002
117
4
168
and even if i put inside /etc/security/limits.conf

username hard nproc 220
username soft nproc 220

save it and check its still the same as before. so there must be another file to change

the main problem is that cronhjobs of the affected users wont work anymore. just checked there are several accounts with the same errors
==============
EDIT
==============

i forgot the @Username - now it works
 
Last edited:

Michael-Inet

Well-Known Member
Feb 20, 2014
113
15
68
Nashville, TN, USA
cPanel Access Level
Root Administrator
Old thread, Google’s first hit...

I tried everything on this thread, and more, and the only thing that ‘fixed’ it was to turn off Shell Fork Bomb Protection as cPanelMichael links to.

WHM >> Home >> Security Center >> Shell Fork Bomb Protection

Best All,
Michael
 
  • Like
Reactions: andrew.n and cPRex