Start of Content Area

Background documentation Calculating Resources for Asynchronous and Transactional RFC  Locate the document in its SAP Library structure

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 takes on the check.

The check algorithms are executed in the SAP kernel and are described in detail in the following chapters:

Local Check

Detailed Check

On the client you can also carry out a resource check on the RFC server. To do this use the ARFC options in transaction SM59. These are described in section: Triggering Resource Checks on RFC Client.

Note

You can control how detailed the check is on the server using the parameter rdisp/rfc_check.

Checking the Resources on the Local Application Server

To carry out a local check, call the 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: 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)

Checking the Resources of Another Application Server

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

The function module has the following export parameters:

·        NOREQ: number of possible asynchronous requests

·        MAXREQ: maximum number of possible asynchronous 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.

Reducing Resources

Each resource may be reduced, if the current usage is very close to the quota.
new_resource = min((quota-count),resource)

Default Wait Time

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.
The wait time is calculated as follows:
quota = resource * parameter value / 100
count = current usage of resource

As no resources are provided, count > quota
wait = min (max(1,count-quota), max_wait).

 

 

 

 

End of Content Area