locked
IIS Thread Usage for WCF and Db Connections RRS feed

  • Question

  • User1722575012 posted

    I am running a rest interface(using ApiController class) using the ASP.NET 4.6 and IIS 7.5.   The rest interfaces are making a WCF asynch call out to a web service to log all the incoming and outgoing request and response strings for tracking purposes.  The C# code is accessing an Oracle database using the ODP.net 4.112.3.0.

    Under normal load everything works fine on the site in production.  However, when a huge spike in traffic comes (14k requests within 10 minutes) we start to see long response times from the initial request/response logging web service we have and then we see database timeouts.  The database team sees no connection issues on the db server.  I know the async logging WCF calls get pushed to the CLR threads to be run.  My question is are the threads in IIS that are being used to make the outbound wcf asynch web service call the same threads that are used to access the database and thus causing the database timeouts?  If so how can I determine what the max threads are on each machine and how to optimize the usage of the threads?

    Wednesday, November 8, 2017 4:48 PM

All replies

  • User1120430333 posted

    The ASP.NET Worker Process that services the Application Pool that is hosting the ASP.NET solution may be what you should be looking at. And You may have to use Process Explorer and drill down into a given WPW3.exe and see thread usage at the time of the issues.

    https://fullsocrates.wordpress.com/2013/02/28/asp-net-threads-thread-parameters-in-iis-worker-processes-2/

    Wednesday, November 8, 2017 6:44 PM
  • User1168443798 posted

    Hi katiehitchco,

    >> However, when a huge spike in traffic comes (14k requests within 10 minutes) we start to see long response times from the initial request/response logging web service we have and then we see database timeouts.

    Could you share us how you interop with database in web service?

    Based on your description, the request is following client-> ApiController in Asp.Net-> API call WCF by async->WCF call web service->web service call database, am I right?

    Do you use Repository pattern to design the code to interop database?

    Best Regards,

    Edward

    Thursday, November 9, 2017 5:11 AM