best practice to adjust services instance number parameters
dear all,
I have an application which consume different set of services. One client application to WCF services is a WPF application and I have also services which are client of other services.
Based on that I have set up a test environement and let the whole application running with wcf tracing on to identify potential bottleneck.
After 3 full days of run, I get my client application which is not receiving anymore callback information form my services.
What I am trying to identify is if it comes from InstanceNumber or Max limit reached based on service configuration.
Is there an easy way, or more generally a best practice to track during the run of the application the number of running service instances in order to see if those instances are constanly increasing and after a while connection gets drop due to that or if it comes froma quota which is reach.Is tehre such facility to track in a way those max value we have configure in config files ?
thnaks for help
serge
Your experience is build from the one of others
Odpovědi
Hi Serge,
If you are sure that the problem is likely at the max limitation of WCF service instance(other similar limtations), you can first review all the potential limitations from WCF throttling setting. Here is a good article mentioned the common 3 throllting limits:
#Wcf configuration - Throttling settings
http://blogs.microsoft.co.il/blogs/aviwortzel/archive/2009/05/12/wcf-configuration-throttling-settings.aspx
you can adjust those settings respectively to verify the changes.
Also, for checking service instance number at runtime, I think you you can also consider using a debugger(such as windbg) to attach the wcf service proxy and lookup the service instance in the .NET managed heap to get the actual instance number(live in the .NET managed heap).
If you're not familar with windbg and sos, here are some reference which will be helpful:
#Get Started: Debugging Memory Related Issues in .Net Application Using WinDBG and SOS
http://www.codeproject.com/KB/debug/WinDBGAndSOS.aspxhttp://www.codeproject.com/KB/debug/WinDBGAndSOS.aspx
Please remember to mark the replies as answers if they help and unmark them if they provide no help.- Označen jako odpověďSteven Cheng - MSFTMSFT, Moderátor8. července 2009 9:04
Všechny reakce
- Hi Serge,
You should check out the WCF-related performance counters:
http://msdn.microsoft.com/en-us/library/ms735098.aspx
There are basically three sets of perf. counters that offers different granularity:
Operation-level, endpoint-level and service-level perf. counters.
--larsw
Lars Wilhelmsen | Senior Consultant | Miles, Norway | Connected Systems MVP | http://larswilhelmsen.com/ Running several days with tracing enabled is not appropriate, in my opinion. Enable Performance counters (see the link from Lars Wilhelmsen) and you'll be able to track the usage of your web services.
You also talk about "callbacks". Are you using duplex services? In this case you have to set maxConcurrentSessions appropriately.
Nordine Ben Bachir- thnaks lars I will check
And with those counter I can compare there values with the max limits of my config files ?
Are the similrarity are easy to match ?
I mean if I wan to verify that the maxConcurentInstance counter in connfig file is not reached , will this counter will be named similar in tracing ?
Your experience is build from the one of others - Hi again,
And you should also be careful to dispose the client proxy instances appropriately ( Abort() or Close() - depending on the State of the channel).
--larsw
Lars Wilhelmsen | Senior Consultant | Miles, Norway | Connected Systems MVP | http://larswilhelmsen.com/ - Hi again Serge,
Check out Instances & Calls Outstanding in the ServiceModelService 3.0.0.0.
Note that the service must be running before you add the counters in perfmon.exe - or the instance(s) will not show up in the Add Performance Counter... dialog.
--larsw
Lars Wilhelmsen | Senior Consultant | Miles, Norway | Connected Systems MVP | http://larswilhelmsen.com/ be carefull on closing and abort channel based on states yes I do that carefully
Things which is hard to defined actually is the proper paramerters for those max value or max instaince etc..
Your experience is build from the one of othersHi Serge,
If you are sure that the problem is likely at the max limitation of WCF service instance(other similar limtations), you can first review all the potential limitations from WCF throttling setting. Here is a good article mentioned the common 3 throllting limits:
#Wcf configuration - Throttling settings
http://blogs.microsoft.co.il/blogs/aviwortzel/archive/2009/05/12/wcf-configuration-throttling-settings.aspx
you can adjust those settings respectively to verify the changes.
Also, for checking service instance number at runtime, I think you you can also consider using a debugger(such as windbg) to attach the wcf service proxy and lookup the service instance in the .NET managed heap to get the actual instance number(live in the .NET managed heap).
If you're not familar with windbg and sos, here are some reference which will be helpful:
#Get Started: Debugging Memory Related Issues in .Net Application Using WinDBG and SOS
http://www.codeproject.com/KB/debug/WinDBGAndSOS.aspxhttp://www.codeproject.com/KB/debug/WinDBGAndSOS.aspx
Please remember to mark the replies as answers if they help and unmark them if they provide no help.- Označen jako odpověďSteven Cheng - MSFTMSFT, Moderátor8. července 2009 9:04

