we have some tools and services which communicate with the same COM server. After some time we get the error
COMException (0x800706BA) RPC server unavailable
It seems that one application blocks the RPC while second tries to communicate and fail. It's not ever the same app and sometimes it takes hours before that occurs. But worst: After the RPC error came for the first time the belonging application gets the same RPC error each time it calls a COM function to this COM server - it's dead. After restarting the application (or service) all runs well, until next time... Is there a way to decide if the RPC is available and then to wait until it's free? If not I have to create a new COM object and hope that I don't have to restart the application.
Thanks for any help.
(0x800706BA) RPC server unavailable means the client cannot contact the RPC server on the COM server side. Note that there's a separate code for RPC server is too busy. This can happen because either of the following happened:
Note that the latter pretty much matches your description - you instantiated a COM object, obtained a pointer to it and it works for some time and then something happens and any attempts to access the object via that pointer yield RPC server unavailable because well, there's likely no COM server process running anymore and to the RPC server inside it has also disappeared. The only thing you could meaningfully do in this case is reinstantiate the COM object. You will need additional logic in your application that accounts for such cases.
I have come across this error with a COM+ object and got it resolved. If a COM+ object is created and used in an application and over the time if the COM+ application gets recycled, reusing of the same COM+ object gives this error. You may have to re-instantiate the COM+ object to get it work again. You can try the following steps to reproduce the error:
User contributions licensed under CC BY-SA 3.0