Recently I have discovered that WCF doesn’t support service-side timeouts. For a great code example and explanation of behavior check out this post on my favorite QA site, StackOverflow.
I know you’re probably thinking “don’t right code that runs too long” or something along those lines. In high concurrency systems, any number of things could cause code to run abnormally long lengths of time. Just think about DTS (Distributed Transactions) as well as 3rd party system integrations.
The basic problem is as stated in the post, the code running on the server never stops. This is the equivalent of IIS not having timeouts. Ludicrous. The current solution is to write error-prone thread abort code ourselves. It gets even weirder with WCF as you have client timeouts you can set. So you can set a nice 20 second client timeout and the client will get a nice fault saying the operation timed out. Good right? No. The client has been disconnected, but the code is continuing on like nothing happened on the service.
Well I know it probably doesn’t apply to a lot of people, but I needed somewhere to vent about it.
0 comments:
Post a Comment