Wednesday, February 13, 2008

BizTalk 2006 Ghost Exceptions

Quite for some time now, I was getting NULL exceptions, which didn't include any messages or exception data whatsoever. This, in its turn was causing the exception handling to fail and throw an unhandled exception. Since it was rather unclear on what was causing this kind of behavior in the first place, it took me a while to figure out the root cause of it.
It turned out - this was caused by the transaction timeout expiring on the "caller" orchestration, before the "callee" orchestration finished its processing.
What I mean by that:
I would usually have one "wrapper"/"caller" orchestration with the long-running transaction in it (timeout set to X seconds), from which I would call the "processing"/"callee" orchestration. "Callee" orchestration would have a long-running transaction in it as well with the timeout set to Y seconds. When I set X too small and/or less than Y, ”caller" orchestration sometimes would force the "callee" to fail with the null exception being thrown, which propagates into "wrapper" orchestration as well. This makes it next to impossible to figure out the cause of failure. I called these exceptions - "ghost exceptions", as they seemed to appear from nowhere.
Another symptom for this is the Error Description - "The instance completed without consuming all of its messages. The instance and its unconsumed messages have been suspended." In this case, orchestration is forced to quit, before all of the messages/responses have arrived.

No comments: