1847272 Members
6938 Online
110263 Solutions
New Discussion

Re: fork error messages

 
xcvzxvzxdv
Advisor

fork error messages

when i login in my server through any user sometimesi get this kind of message

/etc/profile[31]: The fork function failed. Too many processes already exist.
/etc/profile[48]: The fork function failed. Too many processes already exist.
/etc/profile[83]: The fork function failed. Too many processes already exist.
.profile[11]: The fork function failed. Too many processes already exist.
.profile[13]: The fork function failed. Too many processes already exist.
.profile[14]: The fork function failed. Too many processes already exist.
.profile[15]: The fork function failed. Too many processes already exist.
.profile[37]: The fork function failed. Too many processes already exist.

After that I have no other option than to reboot the server, after that everything goes fine
7 REPLIES 7
Pete Randall
Outstanding Contributor

Re: fork error messages

You need to increase the kernel parameter "nproc". The easiest way is to use SAM, increase the parameter, then have SAM rebuild the kernel and reboot.


Pete

Pete
DCE
Honored Contributor

Re: fork error messages



The nproc kernel parameter needs to be increased.


You can check usage via glance - process tables

hth
Dave
James R. Ferguson
Acclaimed Contributor

Re: fork error messages

Hi:

You are exceeding the maxiumum number of processes allowed either for a particular user or system-wide.

You can use 'sar -v' or 'glance' to monitor the value of 'nproc' --- the kernal parameter that governs the overall ceiling for the maximum number of processes running at any one time.

It is more likely that 'maxuprc' has been exceeded. This kernel tunable control the maximum number of processes allowed per user.

I assume that you are running some version of 11i. Therefore, use 'kmtune -l' to list your current values for kenerl parameters.

The manpages for 11.23 have additional information on each kernel tunable. This 11.11 document offers the same for that release:

http://docs.hp.com/en/TKP-90202/TKP-90202.pdf

Regards!

...JRF...
xcvzxvzxdv
Advisor

Re: fork error messages

It is set to 4096 currently
Andrey Tumanov
Frequent Advisor

Re: fork error messages

Try to tune the "maxuprc" kernel parameter. The easiest way is to use SAM.
Florian Heigl (new acc)
Honored Contributor

Re: fork error messages

4096 should be a high enough value in most cases, our larger application servers hardly exceed around 2700 processes, so I'd recommend You to gather some statistics about some many processes are running on Your system.

You could simply use a loop like

count=0
while [ 10000 -ge $count ]
do
sleep 60
date >> /tmp/proclist.$$
ps -ef >> /tmp/proclist.$$
done

This will collect statistics for quite some time, but might help You finding out if there is anything spawning vast amount of processes fast.


Florian
yesterday I stood at the edge. Today I'm one step ahead.
A. Clay Stephenson
Acclaimed Contributor

Re: fork error messages

You might also have a problem in that there is a recursive command being executed by some of your .profiles.

When I have problems with a fork, I use a spoon.
If it ain't broke, I can fix that.