Broken Pipe

Joerg Kammerer (jk@schlund.de)
Mon, 24 Nov 1997 17:54:36 +0100


I tried this:


use LWP::Simple;

  foreach (@domains){
        $url="http://$_/$eyecatchergif";
       
        if ($head = head($url)) {
          # ok document exists
          print "$url\n";
          getstore ($url,"$pathtoeyecatcher/$_.gif");
  }

Where the Size of @domains is about 4000 Domains.
after about 200 or 500 Domains I yielded 
an Broken Pipe error, not the same Domains, rather randomly

Also using the UserAgent

require LWP::UserAgent;
       $ua = new LWP::UserAgent;
       $ua->timeout(10);

  foreach (@ntdomains){
         $url="http://$_/$eyecatchergif";

         my $req = new HTTP::Request 'GET',$url;
         $req = new HTTP::Request 'GET',$url;

         # 
         $res = $ua->request($req, "$pathtoeyecatcher/$_.gif"); #Here:Broken Pipe
         #
         print "After res:" . $res->as_string .  "----\n"; # What goes on??
         if ($res->is_success) { print "is_success\n"; }  # 
         if ($res->is_error)   { print "is_error:$url\n" }#
  }

gives the same results.

To successfully loop through my Domainarray I use now
something like :

foreach (@ntdomains){
  $url="http://$_/$eyecatchergif";

  `./oneeye2.pl $eyecatchergif $pathtoeyecatcher $_  &`;

  }
}

with Spawning  a new Perl-Session :-(





Hope for a Tip...

jk@schlund.de