There are two stages in calculating the resources for an application server. First, the system checks whether there are enough local resources for the check (communication channels and space for ARFC responses). Second, if there are enough resources, the detailed check is then carried out. If you want to carry out a check on the application server, this is done in the work process. If you want to carry out a check on another application server, the dispatcher of this server does the check.
The check algorithms are executed in the SAP kernel, and are described in detail in the following sections:
You can also trigger a resource check on the RFC server from the client. For this you use the aRFC options in transaction SM59.
For more information: Trigger Resource Check as RFC Client
You can control how detailed the check is on the server using parameter rdisp/rfc_check.
To carry out a local check, call function module TH_ARFC_LOCAL_RESOURCES.
This function module has the following parameters:
CHECK_CLIENT_ONLY: If this parameter is set to 1, the check only checks whether there are enough communication channels and space for aRFC responses. This procedure of this check is described in the section Local Check.
If CHECK_CLIENT_ONLY is not set, the Detailed Check is carried out next in the work process.
TRACE: TRACE: if the trace parameter is set, the calculated resources are written to the trace file of the dispatcher, dev_disp.
The function module returns the following export parameters:
NORES: number of resources for asynchronous RFC
WAIT: default value for wait time (in seconds)
REASON: reason why no resources are available
MAXRES: maximum number of available resources
IREASON: reason why no resources are available (internal)
The function module TH_ARFC_REQUESTS is used to check the resources of another server. This function module has the following import parameters:
SERVER: on which server should the resources be calculated?
TRACE: see above
And the following export parameters:
NOREQ: number of possible asynchronous requests
MAXREQ: maximum number of asynchronous RFC requests
REASON: reason why no resources are available
CREASON: reason why no resources are available
When the resources of another application server are checked, first the Local Check, then the Detailed Check are carried out by the dispatcher of the remote application server.
For every resource resources are reduced if the current consumption is too close to the quota.
new_resource = min((quota count),resource)
If no more resources are available, the system offers the caller a wait time. The maximum wait time (max_wait) is set using the profile parameter rdisp/rfc_max_wait_time. The default is 15 seconds. This wait time is calculated as follows:
quota = resource * parameter value / 100
count = current consumption of resource
Since no resources are returned , this is:
count > quota wait = min (max(1,count quota), max_wait).