|
-
Aug 7th, 2013, 08:00 AM
#1
Thread Starter
Junior Member
[RESOLVED] HTTP Web Request multi-threading time out
Hello,
I have a multithreaded application that communicates with a web service by HTTP GETs.
when the program began to experience moderate load, it began to throw "The Operation Has Timed Out" errors on the function that is submitting HTTP Web Requests and retrieving the Web Response.
Another developer suggested this MSDN article: http://msdn.microsoft.com/en-us/library/fb6y0fyc.aspx
He was thinking it might be related, but it looks like something you configure in a web application via its web.config .
Also, here is the piece of my code that times out:
Code:
AwsWebRequest = System.Net.HttpWebRequest.Create("Example.com?exampleParam=example")
AwsWebRequest.Timeout = 10000 'TODO: timeout added for testing - should be able to remove when finished - 2013-08-01
AwsWebResponse = AwsWebRequest.GetResponse
AwsStreamReader = New System.IO.StreamReader(AwsWebResponse.GetResponseStream)
'Result parsing needs work. results will simply be to acknowledge successful request. final results will be posted back later.
AwsResult = AwsStreamReader.ReadToEnd
AwsWebResponse.Close()
My question is, am I missing something? Or is this related to a default connection limit? If so, can it be changed?
Thanks in advance!
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|