HttpWebResponse - deadlock

G

Guest

Hi

I am using HttpWebRequest-HttpWebResponse in a multi thread app. The requests are made synchronous and I’m using a decent # of threads (8 Max).
The problem is this: after a number of successful responses (but not always the same) the app starts to receive time-out response and this number increase until all the requests being made receive Timeout response. The only solution that I found is to restart the app. I’ve tried to stop the request for a few minutes but it’s no use
I keep receive a System.NullReferenceException in System.dll that I cannot catch with try-catch in Debug mode, in Release I can catch her with the same try-catch and I observe that a few threads fail on reading the response stream and my guess is that thaws are the situations when the NullReference is thrown
I don’t know way this thing happen, but probably on the thread pool the HttpWebReq – Res are made asynchronously and that pool-threads are blocking and never recover…if this is the problem there is any way to abort that threads without restarting the application
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top