Muthukumar Palaniappan
Muthukumar Palaniappan

Reputation: 1670

First WCFservice hit takes time to respond. How to manage idle time of a WCFservice

I have hosted my WCF in a windows service with the following binding configuration. I set the receive timeout for 2 hours 10 mins (just for testing).

<wsHttpBinding> 
   <binding name="binding1" transactionFlow="true" receiveTimeout="02:10:00">
          <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="32768" maxBytesPerRead="4096" maxNameTableCharCount="16384" />
          <security>
            <transport clientCredentialType="None" />
          </security>
        </binding>
      </wsHttpBinding>

However, after every 20 minutes idle time, the first request being fired takes 5 to 10 seconds extra than the subsequent requests. I have also set the usedefaultwebproxy settings of client side binding configurations to false.

Could someone help me, where the idle time out is managed in WCF.

Upvotes: 0

Views: 430

Answers (1)

Mimas
Mimas

Reputation: 523

I answered to the same question here once. This is caused by internal ThreadPool management done by WCF, and it requieres some time to warm-up again. Try the hack, which I found once and it really helped a lot.

Upvotes: 1

Related Questions