Domanda

Ho il mio sito ospitato su hosting IIS. Sito ha caratteristica che le esigenze di chiamare servizio WCF e quindi risultato restituito. Il problema è che il sito sta elaborando chiama a servizio WCF un altro sito web chiamata è gelida e non tornare velocemente contenuti (questo è contenuto solo statico). I ha installato due istanze cromati con diversi script iMacros', che si chiama la pagina che le richieste servizio WCF e un altro pagina è solo contenuto statico. Così qui posso solo vedere che quando la prima pagina che le richieste di servizi WCF si blocca, un altro una pagina congela e quando prima viene rilasciato il secondo è troppo.

Ho bisogno di riconfigurare qualcosa nel mio web.config o faccio devo fare qualcosa di diverso per ottenere possibile ottenere immediatamente il contenuto statico.

È stato utile?

Soluzione

Credo che ci sono due problemi separati qui:

  1. Perché la pagina che utilizza il congelamento servizio WCF
  2. Perché la pagina di contenuto statico congelamento

Nella pagina che richiama il servizio WCF un problema comune è che il cliente WCF non è chiuso. Per impostazione predefinita, ci sono 10 collegamenti WCF con un timeout di 1 min. Le prime 10 chiamate vanno bene (dicono che eseguono i 2 secondi), quindi la chiamata 11 ° arriva, non ci sono connessioni WCF liberi si deve quindi attendere 58 secondi per una connessione a timeout e diventare disponibili.

Il perché il vostro blocca pagina statica. Potrebbe essere che il vostro cliente consente una sola connessione al sito, la richiesta della pagina statica non viene inviato fino alla richiesta della pagina con i servizi WCF è completa.

Si dovrebbe controllare il log di IIS per vedere come il tempo must IIS sta riportando che la richiesta è in corso.

Altri suggerimenti

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

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top