Any ideas?

Sure, besides the get a real OS one. -> Use the source Luke. You can see from the debug output that it tries to connect to all 5 URLs so the forking seems intact but is getting 'Failed connection for' errors in the _check_bandwith() function. In fact you can follow the stack trace from beginning to end. Here is a single failure:

LWP::Parallel::UserAgent::_check_bandwith: (LWP::Parallel::UserAgent:: +Entry=HASH(0xe0f768) [http://www.cnn.com] ) LWP::Parallel::UserAgent::on_connect: (http://www.cnn.com) LWP::Parallel::UserAgent::_connect: (LWP::Parallel::UserAgent::Entry=H +ASH(0xe0f768) [http://www.cnn.com] ) LWP::Parallel::UserAgent::init_request: -> (HTTP::Request=HASH(0xa0c23 +c)) [GET http://www.cnn.com] LWP::Parallel::UserAgent::init_request: GET http://www.cnn.com LWP::UserAgent::_need_proxy: Not proxied LWP::Parallel::UserAgent::on_failure: (http://www.cnn.com) LWP::Parallel::UserAgent::_check_bandwith: Failed connection for 'www. +cnn.com:80 '

If you follow through the code you will be able to see that..... the error comes from init_request, which returns a (possibly useful error message) which is them simply ignored due to the calling syntax.

1) LWP::Parallel::UserAgent::_check_bandwith: (LWP::Parallel::UserAgen +t::Entry=HASH(0xe0f768) [http://www.cnn.com] ) 2) LWP::Parallel::UserAgent::on_connect: (http://www.cnn.com) 3) LWP::Parallel::UserAgent::_connect: (LWP::Parallel::UserAgent::Entr +y=HASH(0xe0f768) [http://www.cnn.com] ) 4) LWP::Parallel::UserAgent::init_request: -> (HTTP::Request=HASH(0xa0 +c23c)) [GET http://www.cnn.com] 5) LWP::Parallel::UserAgent::init_request: GET http://www.cnn.com 6) LWP::UserAgent::_need_proxy: Not proxied 7) LWP::Parallel::UserAgent::on_failure: (http://www.cnn.com) 8) LWP::Parallel::UserAgent::_check_bandwith: Failed connection for 'w +ww.cnn.com:80 ' # this method checks the available bandwith and either connects # the request and returns 1, or, in case we didn't have enough # bandwith, returns undef sub _check_bandwith { my ( $self, $entry ) = @_; #1 LWP::Debug::trace("($entry [".$entry->request->url."] )"); ..... } elsif ( $self->_hosts_available ) { #2 $self->on_connect ( $request, $response, $entry ); #3 unless ( $self->_connect ( $entry ) ) { # only increase connection count if _connect doesn't return er +ror $self->{'current_connections'}->{$netloc}++; } else { # calling ->on_failure is done within ->_connect #8 LWP::Debug::debug ("Failed connection for '" . $netloc ."'") +; $self->{'failed_connections'}->{$netloc}++; ..... } sub _connect { my ($self, $entry) = @_; #3 LWP::Debug::trace("($entry [".$entry->request->url."] )"); local($SIG{"__DIE__"}); # protect against user defined die hand +lers my ( $request, $response ) = $entry->get( qw(request response) ); my ($error_response, $proxy, $protocol, $timeout, $use_eval, $nonb +lock) = #4 $self->init_request ($request); if ($error_response) { # we need to manually set code and message of $response as wel +l, so # that we have the correct information in our $entry as well $response->code ($error_response->code); $response->message ($error_response->message); #7 $self->on_failure ($request, $error_response, $entry); return $error_response; }

I suggest this patch for a start so you can read the error message:

} elsif ( $self->_hosts_available ) { $self->on_connect ( $request, $response, $entry ); my $err_msg = $self->_connect ( $entry ); unless ( $err_msg ) { # only increase connection count if _connect doesn't retur +n error $self->{'current_connections'}->{$netloc}++; } else { # calling ->on_failure is done within ->_connect LWP::Debug::debug ("Failed connection for '" . $netloc ."' +\nError: $err_msg"); $self->{'failed_connections'}->{$netloc}++;

cheers

tachyon


In reply to Re: Using LWP::Parallel::UserAgent with perlapp/perl2exe by tachyon
in thread Using LWP::Parallel::UserAgent with perlapp/perl2exe by ldln

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.