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

Hi Monks!!!

I found an error that can solve right now, this's an extract of the debug info:

LWP::UserAgent::request: ()
LWP::UserAgent::send_request: GET https://www.paypal.com/
LWP::UserAgent::_need_proxy: Not proxied
LWP::Protocol::http::request: ()
LWP::Protocol::collect: read 1460 bytes
LWP::Protocol::collect: read 4096 bytes
LWP::Protocol::collect: read 82 bytes
LWP::Protocol::collect: read 194 bytes
LWP::Protocol::collect: read 4096 bytes
LWP::Protocol::collect: read 284 bytes
Terminating on signal SIGINT(2)

After many request, the lwp module freeze, the signal int is becouse i stop the process

I have the last version of LWP and i using this on win

Here's the question, do you know what's happend, i set a timeout but appear not works, if i see in the proxy log or netstat i can see the conection alive.

Any suggestion i'll grateful

Regards

UPDATED:

#!/usr/bin/perl use strict; use warnings; use LWP::UserAgent; $|++; my $ua = LWP::UserAgent->new( timeout => 30 ); $ua->agent("Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)"); for (0..1000) { my $req = HTTP::Request->new( GET => "https://www.amazon.com/" ); $ua->request($req); print "Ok\n"; }

I'm not use ->get but i suppose that has the same problem, thinking about the problem, perhaps this's not a Perl problem instead an Apache directive/module...

Anyway, the Perl problem is that not recognize timeout on https page.

To Amazon i see the error in the first or second query, tell me if you can see the same problem or what's do you think about that..

Using proxymodo i saw the running request and open connection alive and frozen so, it's only continue if i abort (close the connection).

As always any suggestion is welcoming sorry about not add a complete explanation in the first post

Thk

Replies are listed 'Best First'.
Re: LWP::protocol freeze
by Anonymous Monk on May 01, 2008 at 08:50 UTC
    Line 57
      Line 57 of what?

      Yours is not a helpful answer and not in line with the usual practice of our Monastery.

      CountZero

      A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James

      Well, exactly countzero said, line 57 of what?, i check LWP::Protocol but not appear have an error there.

      Do you have other reference?

      Thk U

        I guess that Anonymous Monk is making a joke on you. We can't know where the error is, because you don't show us any code, any data or anything to work with. How do you expect us to help you?

        Please reduce your code to the minimal self-contained program that still fails. This program should be about 20 or 30 lines in length. It should also contain all the data necessary to reproduce the error. Please also explain what you think should happen, and what happens for you.