What would cause/how can I prevent a ContextSwitchDeadlock?
问题 I have a rather long-running process in a Windows Service that periodically throws a "ContextSwitchDeadlock" exception: I have also rigged my service to send myself emails with details about encountered exceptions. I get: Date: 05/25/2016 09:16:32: Exception message: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding. Exception Source: .Net SqlClient Data Provider ...and then three seconds later this: Date: 05/25/2016 09:16:35: