RPC HELP DEBUG Client Timeout and Buffer Clearing
From VistApedia
Client Timeout and Buffer Clearing
If a remote procedure call (RPC) fails to successfully complete due to a timeout on the client, the buffer on the VistA M Server would contain data from the uncompleted call. Without special handling, this buffer on the server would be returned whenever the next RPC was executed.
The solution to this problem is:
- The RPCTimeLimit property on the TRPCBroker component on the client helps avoid the problem in the first place.
- In the event of a cancellation of a Network I/O operation, the Broker state on the client changes from NO FLUSH to FLUSH. When this state change occurs, the next RPC executed undergoes a READ operation prior to execution where any leftover incoming buffer is discarded. At the end of this operation, the Broker state on the client will return to NO FLUSH and the RPC will execute normally. While the FLUSH state exists, users may experience a delay while the corrupted RPC data is discarded. The delay will be proportional to the amount of data in the buffer.