Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Threads and multiple http connections

Threads and multiple http connections

Scheduled Pinned Locked Moved C#
helpdebuggingquestion
4 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    PeterJensen
    wrote on last edited by
    #1

    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

    L 1 Reply Last reply
    0
    • P PeterJensen

      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

      L Offline
      L Offline
      leppie
      wrote on last edited by
      #2

      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

      P 1 Reply Last reply
      0
      • L leppie

        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

        P Offline
        P Offline
        PeterJensen
        wrote on last edited by
        #3

        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

        G 1 Reply Last reply
        0
        • P PeterJensen

          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

          G Offline
          G Offline
          grv575
          wrote on last edited by
          #4

          If you are looking to track down the bug I'd recommend the allocation profiler which will give you memory snapshots (same site) and compuware's devpartner profiler might give you some insight.

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups