Operating System - HP-UX
1835036 Members
4373 Online
110073 Solutions
New Discussion

fork: resource is temporary unavailable

 
SOLVED
Go to solution
Andreas D. Skjervold
Honored Contributor

fork: resource is temporary unavailable

Hi

Have a L-2000 with 11i installed, with 2GB RAM.
and keep getting:
bash: fork: resource is temporary unavailable

But can't figure out which resource?
Only by ignoring what everyone think is important, can you be aware of what everyone ignores!
5 REPLIES 5
Ruediger Noack
Valued Contributor

Re: fork: resource is temporary unavailable

Hi Andreas,

Don't know this error message exactly.
Have you checked the syslog.log file an your nproc parameter? You can get the nproc peek simple with sar -v (sa1 script via cron).

Ruediger
Andreas D. Skjervold
Honored Contributor

Re: fork: resource is temporary unavailable

Hi

Have no entrie in syslog, and have checked nproc (and increased it, to be sure) but the error remains.

Have began checking if this could be shell spesific.

Could this error occur if ulimit values are too low, and
how do I set ulimit values in a users / all users shell (bash)

Andreas
Only by ignoring what everyone think is important, can you be aware of what everyone ignores!
James R. Ferguson
Acclaimed Contributor
Solution

Re: fork: resource is temporary unavailable

Hi:

'nproc' specifies the global (system-wide) number of processes that can run simultaneously. Exceeding this value can lead to fork errors. On a per-user basis, the kernel parameter 'maxuprc' also imposes a limit which if exceeded leads to fork errors too. 'maxuprc' defaults to 50 and specifies the maximum number of simultaneous user processes that any given user can be running.

Regards!

...JRF...
Bill Hassell
Honored Contributor

Re: fork: resource is temporary unavailable

bash (like the POSIX shell) supports ulimit options. Use ulimit -a to see the current settings. To see how many processes a single user is running:

ps -u user-name | wc -l

If it is close to 50 then the user is probably hitting the maxuprc limit in the kernel. This is a fence to prevent runaway processes or scripts from using all the resources. If the user doesn't expect to run that many processes, these may orphan processes that were left behind when login sessions were improperly terminated (as in a PC crash or reboot).


Bill Hassell, sysadmin
Krishna Prasad
Trusted Contributor

Re: fork: resource is temporary unavailable

I have also seen fork messages when a process needs swap space and there is not enough swap space.

What does swapinfo -ta show?
How much memory is available on the box?
Positive Results requires Positive Thinking