Operating System - HP-UX
1753522 Members
11077 Online
108795 Solutions
New Discussion

sshd do_exec_no_pty: fork: Resource temporarily unavailable

 
piyut_1
Frequent Advisor

sshd do_exec_no_pty: fork: Resource temporarily unavailable

Hi all,

 

I have a system with mant errors said "do_exec_no_pty: fork: Resource temporarily unavailable". I have checked there are many ssh connection about 665 ssh connection. how to fix this problem?

4 REPLIES 4
Dennis Handly
Acclaimed Contributor

Re: sshd do_exec_no_pty: fork: Resource temporarily unavailable

Are you out of ptys?  What are your kctune(1m) kernel parms for: npty and nstrpty

And what is your kcusage(1m) values for those parms?

piyut_1
Frequent Advisor

Re: sshd do_exec_no_pty: fork: Resource temporarily unavailable

this is it:

bash-4.1# kcusage
Tunable Usage / Setting
=============================================
filecache_max 6511497216 / 6523100774
maxdsiz 268369920 / 1073741824
maxdsiz_64bit 3949608960 / 4294967296
maxfiles_lim 383 / 4096
maxssiz 786432 / 8388608
maxssiz_64bit 8388608 / 268435456
maxtsiz 35868672 / 100663296
maxtsiz_64bit 8495104 / 1073741824
maxuprc 281 / 256
max_thread_proc 312 / 3000
msgmni 2 / 512
msgtql 0 / 1024
nflocks 53 / 4096
ninode 1702 / 8192
nkthread 2271 / 8416
nproc 665 / 4200
npty 0 / 60
nstrpty 2 / 60
nstrtel 1 / 60
nswapdev 1 / 32
nswapfs 0 / 32
semmni 31 / 2048
semmns 149 / 4096
shmmax 17879320 / 1073741824
shmmni 10 / 400
shmseg 3 / 300

maxuprc usage greater than configured.
Dennis Handly
Acclaimed Contributor

Re: sshd do_exec_no_pty: fork: Resource temporarily unavailable

>npty 0 / 60
>nstrpty 2 / 60

 

Hmm, that's not close to 60 or your 665 ssh connections.

 

Looking at fork(2), indicates EAGAIN if too many processes total (nproc 665 / 4200) or too many per user (maxuprc 281 / 256).

 

>I have checked there are many ssh connection about 665 ssh connection. How to fix this problem?

 

Are these all by one (or a few) users?

 

>maxuprc usage greater than configured.

 

Right, that looks like the problem.  You should be able to use kctune(1m) to increase it.

piyut_1
Frequent Advisor

Re: sshd do_exec_no_pty: fork: Resource temporarily unavailable

-> Are these all by one (or a few) users?
all connection by one user. this server used for monitoring dashboard and there are many ssh process from other server to this server to put data for monitoring

-> Right, that looks like the problem. You should be able to use kctune(1m) to increase it.

currently, i have increased this parameter to 4096.

many thankss, let me monitor this changes.