1837105 Members
2176 Online
110112 Solutions
New Discussion

Re: Fork process

 
pnvs
Occasional Advisor

Fork process

Hi all,
When application team trying to transport data to production box they are getting error like..
" FUNCTION: 'RfcExecProgram'#Not enough space (fork)."
/ & /usr/SAP/trans/ Filesystems have enough free space. Is there any os max process or any such limit will be there? if yes how can I check that.
and how to check the max process limit for a particular user..?
can any one help me.Thanks in advance.
7 REPLIES 7
Luk Vandenbussche
Honored Contributor

Re: Fork process

A. Clay Stephenson
Acclaimed Contributor

Re: Fork process

This has nothing to do with file system space. Fork() failed because there was not enough virtual memory; you need more swap space.

Fork(0 returns a different error if you hit the system-wide process limit (nproc) or the per-user process limit (maxuprc). You can display these values using kmtune or kctune.

e.g. kmtune -q maxupc

Man 2 fork will explain the various ways fork(0 can fell and how errno is then set.
If it ain't broke, I can fix that.
James R. Ferguson
Acclaimed Contributor

Re: Fork process

Hi:

You are either out of swapspace or your 'maxdsiz' kernel parameter(s) are too small, or your 'ulimit' has restrained you.

Examine your swap with 'swapinfo -tam' and your kernel paramters with 'k(c|m)tune' and your 'ulimit'.

Regards!

...JRF...
Basheer_2
Trusted Contributor

Re: Fork process

Hi pnvs,

Usually the application specifies the values for Kernel parameters.

check nproc
do
sar -v 1 1
09:46:34 text-sz ov proc-sz ov inod-sz ov file-sz ov
09:46:35 N/A N/A 365/8212 0 3163/9404 0 4210/15205 0


look for column proc-sz. in the above ex:
365/8212 . 365 is the current value and 8212 is the allocated value
pnvs
Occasional Advisor

Re: Fork process

Hi Basheer,

I checked that. Proc-Sz is 533/3220. and when I
check ulimit it is giveing as unlimited. even
for root ID and as well as dapadm( SAP ) ID also. so is there any way to check the maximum allowed processes for a particular user.
Bill Hassell
Honored Contributor

Re: Fork process

AS mentioned, you are likely hitting a fence imposed by the kernel. ulimit reports unlimited when it really means: memory is limited by the maxdsiz (or maxdsiz_64) kernel parameter. The command to see your memory limit is:

kmtune | grep maxdsiz

or if you are running 11.23 or higher:

kctune | grep maxdsiz

The number is in bytes and maxdsiz will default to 67 megs or 200 megs depending on the version you are running.

Now you should change maxdsiz to about 1700 megs and increase maxdsiz_64 to about 3 Gb or so. This assumes that you cannot find out what the application requires for memory. Note that maxdsiz_64 must be larger than maxdsiz.


Bill Hassell, sysadmin
Dennis Handly
Acclaimed Contributor

Re: Fork process

>JRF: You are either out of swapspace or your maxdsiz kernel parameter(s) are too small, or your 'ulimit' has restrained you.

Since a fork makes a copy of your space and you already fit, you should not be limited by maxdsize or ulimit. (Unless these limits were mysteriously made smaller.)

So as Clay says, you are out of swapspace. You need to do:
$ swapinfo -mta

Then add more.