rustyx5 has asked for the wisdom of the Perl Monks concerning the following question:

Hi all :)
I'm trying to maximize performance of LWP::UserAgent (simple web page download module), and I would like to avoid exceeding Windows limitation of maximum 10 half-open connections (Event 4226). One way is to have just 10 simultaneous downloads, but its too restrictive, I'm sure there is a smarter way :)
TIA
Rusty
  • Comment on "Do not exceed 10 half-open simultaneous connections" flag for LWP::UserAgent

Replies are listed 'Best First'.
Re: "Do not exceed 10 half-open simultaneous connections" flag for LWP::UserAgent
by NetWallah (Canon) on Mar 13, 2008 at 01:50 UTC
      I assume you are using this for a bot. Why not set up a loop that accepts the limit, but monitors when a download is finished, closes that Agent, then does another, etc.? You would still face the limit at any given time, but could could sset it up to contually execute...
        No, this is sort of a web crawler, so I initiate all my connections myself. As I said before, one real easy solution is to only have 10 at any given time, but in reality I can have more, just not more than 10 in the "connecting" state at any given time. Damn it, I should probably get a normal O/S :-)