gtpa2m2wApplication Programming

RPC Calls

You can use the rpc_server_listen API with the max_calls_exec parameter to specify the maximum number of RPC server calls that are running concurrently on the TPF 4.1 system. The run-time library accepts or rejects an RPC call (the call is not queued) when accepting a connection for TCP implementation; this is determined by the number of calls that are currently running. The max_calls_exec value must take into account thread resources and must be a number greater than zero and less than the maximum number of threads per process. You can use the following formula as a guideline:

(2 * max_call) + 3 threads defined 

To change the maximum number of threads allowed for each process, see the information for the MTHD parameter of the ZCTKA ALTER command in TPF Operations.

If the TPF 4.1 system cannot acquire heap storage while attempting to receive a call, a dump occurs and the RPC server is exited. If the TPF 4.1 system cannot create a thread to process the RPC call (because of maximum thread limitations), RPC closes the newly accepted socket and the server continues to run. Done at accept time, this form of throttling rejects the RPC calls if system resources are not available and processes the next RPC call as soon as system resources become available. Although it has an impact on the client, this throttling is not unique to the TPF 4.1 system. If errors such as queue limits exceeded or network failures occur, the client can retry the call.