I’ve been working on a Azure worker role that hosts a netTcpRelayBinding WCF service. All seems to work well until One of my connected hosts disconnects unexpectedly. Over the next couple of minutes, the role consistently loses stability and then reports itself as unhealthy.
I’m not sure where I should be looking. I’ve got IntelliTrace enabled, and I’ve got some exceptions, which start with the TimeoutException you’d expect, but then continue on. I get these messages:
System.ServiceModel.CommunicationException – Inactivity timeout of (00:00:10) has been exceeded.
System.InvalidProgramException – The Common Language Runtime detected an invalid program
After this, I get a series of communication exceptions, timeoutexceptions, and then eventually the whole host crashes with an OutOfMemoryException.
Things to note: I’ve got 1 client connected. No other calls or activity. When he disconnects unexpectedly, the above consistently happens.
Tried catching the servicehost Faulted but that seemed to do nothing (can’t see where it was hit in IntelliTrace logs.
Any ideas on where I should be looking? Surely I don’t need to recreate the service every time something like this happens right?
That doesn’t sound familiar. Can you reproduce this and how’s your role feeling overall, meaning what’s the CPU load looking like and what else is going on in parallel?
Cheers,
Clemens