Web API Controller method executes to end. No HTTP response. Hangs

-2

I am looking for an approach to debugging this scenario. I have verified in Fiddler that there is no HTTP response at all. To be clear, as I understand it a controller method should not simply hang, there is no exception. I have verified the lack of response in Fiddler. The method returns a valid object, verified by stepping through the code to the final return statement.

This is different from the original question in that the controller method is hit, and was not before. The reason for this is explained in the original question. ASP.NET Web Api. Controller not hit. No response at all. Approaches to diagnose?

UPDATE

I am now seeing this behaviour, even though the request completes the handler and returns 200

ExtensionlessUrlHandler and "Recursion too deep; the stack overflowed"

1506.  -GENERAL_REQUEST_END 


BytesSent
6069 

BytesReceived
436 

HttpStatus
200 

HttpSubStatus
0 

From near the end

ErrorDescription
Internal Server Error 


0 ms

Warning
1170.  -MODULE_SET_RESPONSE_ERROR_STATUS 


ModuleName
ManagedPipelineHandler 

Notification
EXECUTE_REQUEST_HANDLER 

HttpStatus
500 

HttpReason
Internal Server Error 

HttpSubStatus
0 

ErrorCode
Recursion too deep; the stack overflowed.
 (0x800703e9) 
asp.net
asp.net-web-api
rabbitmq
owin
stack-overflow
asked on Stack Overflow Jan 3, 2017 by Tom • edited May 23, 2017 by Community

1 Answer

0

This turned out to be a crashed instance of RabbitMQ in combination with OWin middleware that was trying to use that instance (to log exceptions such as being unable to connect to the MQ instance; or rather attempting to log them by sending them to.. the MQ instance) and was thus swallowing exceptions in a recursive fashion. The stack overflow was caused by re-entering these middleware instances endlessly. The logging middleware was throwing exceptions because it could not log and the exception handling middleware was handling those exceptions by sending them to the logging middleware. Interesting stuff.

In addition to re-booting to cure the crashed and inaccessible RabbitMQ (restarting the service was not enough) the problem was still not resolved (different symptoms as described above) unless the nuget package MassTransit.RabbitMQ 3.3.2 (old version) and the dependencies (including RabbitMQ.Client) which this exact version brings with it, were installed, rather than the latest versions.

I hope this will help someone.

answered on Stack Overflow Jan 5, 2017 by Tom • edited Jan 5, 2017 by Tom

User contributions licensed under CC BY-SA 3.0