TL;DR; Give the worker process more threads!
Background
We have an ASP.NET application that expose a Web API where one of the "endpoints/methods" makes a set of queries to external system (SQL, AD etc.) and takes approx. 4 seconds.
The IO calls are synchronous so the request thread is blocked until everything is finished.
The application is written i .NET 4.6.2 and running on IIS 7.5
Problem
We experience very spiky load with 100 of request to the endpoint for a short period of time which seems to result in "thread starvation" with request queueing up as a result. This leads to unacceptable response times for the rest of the application.
CPU and memory is fine on the server during the load burst period. SQL is fine and AD is fine as well (i.e. they respond to other requests from other applications without problem)
Possible solution
My goal was to give the workerprocess more threads but cannot seem to find the correct configuration.
I've tried the recommendation in the following article: https://support.microsoft.com/en-us/help/821268/contention-poor-performance-and-deadlocks-when-you-make-calls-to-web-s
With the resulting machine.config:
<processModel autoConfig="false" maxWorkerThreads="200" maxIoThreads="200" minWorkerThreads="100"/>
<httpRuntime minFreeThreads="704" minLocalRequestFreeThreads="608"/>
but it seems to give small or no result compare to using default values.
Am i missing something?