3

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.

user247702
  • 23,641
  • 15
  • 110
  • 157
soyrochus
  • 101
  • 3
  • set debug = false if its true.. Find a related discussion here (http://stackoverflow.com/questions/2231015/is-there-a-way-to-make-executiontimeout-take-effect-while-debugging) – Rahul Patel Oct 14 '13 at 21:58
  • I have edited your title. Please see, "[Should questions include “tags” in their titles?](http://meta.stackexchange.com/questions/19190/)", where the consensus is "no, they should not". – user247702 Oct 14 '13 at 23:46

2 Answers2

2

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..

Community
  • 1
  • 1
Rahul Patel
  • 500
  • 3
  • 11
0

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.

Juan
  • 1,352
  • 13
  • 20