Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Service too busy error in WCF

I intermittently get the following exception in my .Net WCF Service. "The HTTP service located at http://MyServer/TestWCF/MyService.svc is too busy."

Am I missing something here?

Am using basic http binding and have enabled WCF throttling.

<basicHttpBinding>
        <binding name="BasicHttpBinding_MyService" maxReceivedMessageSize="2147483647"
                 messageEncoding="Text" textEncoding="utf-16" sendTimeout="00:01:00" >
          <readerQuotas maxStringContentLength="2147483647" maxArrayLength="163840000"
                        maxDepth="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="16384" />
        </binding>

. . . .

<behavior name="MyWCFServices.MyServiceBehavior">
          <serviceMetadata httpGetEnabled="true" />
          <serviceDebug includeExceptionDetailInFaults="true" />
          <serviceThrottling
                    maxConcurrentCalls="16"
                    maxConcurrentInstances="2147483647"
                    maxConcurrentSessions="10"/>
        </behavior>

Will throttling help resolving the issue? Also,may i know the recommended parameter values for throttling for a high traffic web site?

like image 740
Steve Chapman Avatar asked May 23 '09 01:05

Steve Chapman


2 Answers

You could definitely try to increase the maxConcurrentSessions and maxConcurrentCalls in your service throttling behavior to the standard values of 30 or so and see if that makes the error go away. Server too busy would seem to indicate that more requests have come in than area allowed by your service throttling behavior, and they've been discarded since no service instance became available to service them within the given timeout period.

like image 70
marc_s Avatar answered Nov 03 '22 10:11

marc_s


My answer would be, check if the app pool is up and well?

I've seen this error occurring when the app pool has died due to exceptions being thrown that aren't caught.

Consider for example, custom config sections - having an error in there, will cause your app to fail before it's even started. Too many of these in a short space of time will kill the app pool.

like image 9
Adam C. Avatar answered Nov 03 '22 10:11

Adam C.