Knowledge Base

PRB: Intermittent AV During Message Handling on RPC Calls

Article ID: 190687

Article Last Modified on 3/2/2005


APPLIES TO


This article was previously published under Q190687

SYMPTOMS

During server-to-server remote procedure calls (RPCs), message handlers may not install properly which results in an access violation (AV) if the message handler is initialized. In some cases, if the message handler contains invalid address information, an unhandled exception can occur.

CAUSE

Server-to-server RPCs are done through a DB-Library connection from the originating server to the destination server. The originating server receives simple messages such as the following:
msg 5702 "changed database context"

This is handled by the message handlers that were installed by the originating server. Sometimes, these message handlers are not installed properly and this causes the AV.

WORKAROUND

Increase the timeout value for the sp_configure system stored procedure "Remote Connection Timeout" parameter to a higher value. The default is 10 minutes; increasing it to 60 minutes should be sufficient to avoid the AV. If the problem persists, consider increasing this to a higher value, based on the usage of RPCs in your implementation. This parameter controls how long a previously-used connection is maintained for potential reuse. Because existing connections have proper message handlers, you do not run into this problem.

Additional query words: prodsql av server dies remote proc calls procedure failure

Keywords: kbprb KB190687