Search code examples
wcfwcf-proxy

How bad is it if I don't close WCF/ASMX proxies?


So somebody (ok it was me) didn't realize you need to close WCF proxies after using them.

How bad is this? What kind of problems can it cause.

Is there just a delay in closing resources because of garbage collection - or should I really worry about things like premature app pool recycling?

I actually have far more ASMX than WCF proxies with this issue - so the same question goes for ASMX also.

Obviously now that I know this I'm going to gradually fix it, but would appreciate input on how bad this really is?


Solution

  • A WCF service has a default timeout. If you do not close it, the service will wait until there is a timeout.

    WCF also has a max concurrent calls, that has a default of 10.

    Therefore, if you do not close your connections you can only have 10 calls per min. (assuming default settings)

    Here is someone with a similar problem:

    http://social.msdn.microsoft.com/Forums/en-US/wcf/thread/d58ee1c6-032b-40f3-b734-6628f3991bb2/