Reputation: 101
We've got a basic ASP Web API setup: a single ApiController
with a number of methods configured as end-points for POST requests. These receive rather large JSON streams which are deserialized through the [FromBody]
attribute.
What happens is that if connections are interrupted/terminated, the requests are kept in the IIS Worker Process Request Queue. They don't seem to time out. Worse, as something in the RequestHandler
is keeping busy, after a number of failures and "stuck" requests, the CPU consumption is near 100%. Logging indicated that the action methods in the ApiController
haven't executed as yet.
To make a large story short. Is there anything which I can do to let these methods time-out so they will be removed from the queue? Normal web.config doesn't seem to work.
Upvotes: 3
Views: 119
Reputation: 1382
You can configure the Recycling settings of your application pool. In this settings from IIS you can recycle the application pool using a schedule, request number or a specific MB limit.
Upvotes: 0
Reputation: 500
in most cases compilation debug = true is the problem.. Here is some more discussion on similar issue.. if this also doesn't help... take a memory dump of w3wp process when CPU consumption is near 100% and do a dump analysis using windows debugging tools..
Upvotes: 2