Manuel Spezzani @ UGIdotNET

.NET e dintorni
posts - 6, comments - 12, trackbacks - 0

lunedì 20 luglio 2009

WCF e il throttling

Me lo segno a futura memoria, visto che c'ho sbattuto il muso proprio oggi...

In WCF il throttling è abilitato di default per "contenere" l'uso di risorse dell'host e per questioni di sicurezza (es. limitare l'impatto sul server di un attacco DoS).
Per modificarne le impostazioni basta aggiungere il serviceThrottling behavior alla configurazione del servizio:

<behavior name="ThrottlingBehavior">

 <serviceThrottling maxConcurrentCalls="100" maxConcurrentSessions="100" maxConcurrentInstances="100" />

</behavior>

I valori di default sono:
  • MaxConcurrentCalls = 16
  • MaxConcurrentInstances = 26
  • MaxConcurrentSessions = 10

Se il tracing è attivato è abbastanza semplice diagnosticare problemi legati alla configurazione del throttling: ogni volta che viene raggiunta una delle soglie il runtime logga un warning (la prima volta) o un errore.

posted @ lunedì 1 gennaio 0001 00:00 | Feedback (0) | Filed Under [ .NET ]

Powered by:
Powered By Subtext Powered By ASP.NET