Threads and multiple http connections
-
Hi, Im writing an application, that connects to multiple http servers by using threads. I spawn about 30 threads and they uses httprequest and httpresponse. I dont use any callback, cause i have done some simple que syncs. (using lock) Each thread loops to different sites. Its Act a little like a crawler, with reg exp to stript some links etc. My problem is when I have ran the app. for a couple of minutes and I get this error. (I cant catch it) SystemOutOfMemory mscorlib.dll!System.Threading.Overlapped::unpack(System.Threading.NativeOverlapped* nativeoverlapptr = {System.Threading.NativeOverlapped}) I cant debug it, but Im thinking mayby its the httprequest ? Does anyone have problems with httprequest? Or do anybody know how I can find the problem.. (some kind og debugging tips etc)? Or know how I can supress the error msg :) Regards
-
Hi, Im writing an application, that connects to multiple http servers by using threads. I spawn about 30 threads and they uses httprequest and httpresponse. I dont use any callback, cause i have done some simple que syncs. (using lock) Each thread loops to different sites. Its Act a little like a crawler, with reg exp to stript some links etc. My problem is when I have ran the app. for a couple of minutes and I get this error. (I cant catch it) SystemOutOfMemory mscorlib.dll!System.Threading.Overlapped::unpack(System.Threading.NativeOverlapped* nativeoverlapptr = {System.Threading.NativeOverlapped}) I cant debug it, but Im thinking mayby its the httprequest ? Does anyone have problems with httprequest? Or do anybody know how I can find the problem.. (some kind og debugging tips etc)? Or know how I can supress the error msg :) Regards
There is a very good example at GotDotNet. Search for WebSpider, excellent code. He implemented his own threadpool, which you should be doing (I think the max is 30 threads???). You can just modify that. :) I rated this article 2 by mistake. It deserves more. I wanted to get to the second page... - vjedlicka 3:33 25 Nov '02
-
There is a very good example at GotDotNet. Search for WebSpider, excellent code. He implemented his own threadpool, which you should be doing (I think the max is 30 threads???). You can just modify that. :) I rated this article 2 by mistake. It deserves more. I wanted to get to the second page... - vjedlicka 3:33 25 Nov '02
Hi Leppie, Thanks once again for the help! I will certainly look into that. It's looks VERY interesting. :) But I have already done alot of coding making the que, classes etc. All is done by using my current threading method X| But mayby its the solution.. But thanks again leppie! Regards
-
Hi Leppie, Thanks once again for the help! I will certainly look into that. It's looks VERY interesting. :) But I have already done alot of coding making the que, classes etc. All is done by using my current threading method X| But mayby its the solution.. But thanks again leppie! Regards