Question

I have my site hosted on IIS hosting. Site has feature that needs calling WCF service and then return result. The issue is that site is processing calling to WCF service another web site calling is freezing and not return content fast (this is just static content). I setup two chrome instances with different imacros' scripts, which one is calling page that requests wcf service and another one page is just static content. So here I can just see that when first page that requests wcf services freezes, another one page also freezes and when first is released the second is too.

Do I need reconfigure something in my Web.Config or do should I do something else to get possible to get static content immediately.

Was it helpful?

Solution

I think that there are two seperate problems here:

  1. Why does the page that uses the WCF service freeze
  2. Why does the static content page freeze

On the page that calls the WCF service a common problem is that the WCF client is not closed. By default there are 10 WCF connections with a timeout of 1 min. The first 10 calls go fine (say they execute i 2 secs), then the 11th call comes, there are no free wcf connections it must therefore wait 58 secs for a connection to timeout and become available.

On why your static page freezes. It could be that your client only allows one connection to the site, the request for the static page is not sent untill the request for the page with the wcf services is complete.

You should check the IIS logs to see how must time IIS is reporting that the request is taking.

OTHER TIPS

I would say that this is a threading issue. This MSDN KB article has some suggestions on how to tune your ASP.NET threading behavior:

http://support.microsoft.com/kb/821268

From article - ...you can tune the following parameters in your Machine.config file to best fit your situation:

  • maxWorkerThreads
  • minWorkerThreads
  • maxIoThreads
  • minFreeThreads
  • minLocalRequestFreeThreads
  • maxconnection
  • executionTimeout

To successfully resolve these problems, do the following:

  • Limit the number of ASP.NET requests that can execute at the same time to approximately 12 per CPU.
  • Permit Web service callbacks to freely use threads in the ThreadPool.
  • Select an appropriate value for the maxconnections parameter. Base your selection on the number of IP addresses and AppDomains that are used.

etc...

Consider such scenario: when you make a request to IIS your app changes, deletes or creates some file outside of App_Data folder. This often tends to be a log file which is mistakenly was put at bin folder of the app. The file system changes lead to AppDomain reloading by IIS as it thinks that app was changed, hence the experienced delay. This may or may not apply to your issue, but it is a common mistake in ASP.NET apps.

Well, maybe there is no problem...

It may be just the browser's same domain simultaneous requests limit.
Until the browser not finished the request to the first page (the WCF page), it won't send the request to the second page (the static).

Try this:
Use different browsers for each page (for example chrome/firefox).
Or open the second page in chrome in incognito window (Ctrl + Shift + N).
Or try to access each page from different computer.

You could try to use AppFabric and see what is wrong with your WCF services http://msdn.microsoft.com/en-us/windowsserver/ee695849

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top