Unfortunately, now, the server in question is responding perfectly
fine, so I have no way of knowing what it was doing that was breaking
LWP last time. :(
All I know is that this code didn't work (and since it was getting
run every minute, after a short period of time, I had consumed all
the memory and swap space in my machine, sending it to oblivion
*G*)...
If this code is SUPPOSED to work, then I at least know that its not
that code that is buggy but LWP or IO, or something else. (and while
I may not be able to provide more specific information about the bug,
I can show that one exists *G*)
D
>"Derek J. Balling" <[EMAIL PROTECTED]> writes:
>
>> OK, I was having this problem on my 5.005_03 boxen, but then when I
>> moved it to my 5.6.0 boxen, I had the _SAME_ problem.
>>
>> Sample Code:
>>
>> #!/usr/local/bin/perl -w
>> use LWP;
>> use HTTP::Request;
>> use LWP::UserAgent;
>> my $request = HTTP::Request->new (GET =>
>> 'https://216.115.106.210/config/login');
>> my $ua = new LWP::UserAgent;
>> $request -> push_header('Host','login.yahoo.com');
>> $ua -> timeout(45);
>> $SIG{'ALRM'} = sub { die ("Timeout after 45 seconds"); };
>> $ua -> use_eval(1);
>> my $response=$ua->request($request);
>> print $response->code(),"\n";
>> print $response->message(),"\n";
>>
>> Now, currently that host is boned, so it should be timing out after
>> 45 seconds with my spiffy error message.
>>
>> It doesn't.
>>
>> I have tried it both with and without the "use_eval" line. (Hoping
>> that the revised code in 5.6.0 would not require it... still no joy).
>>
>> watchdog6 14:39:50 ~ $ time ./db_test.pl
>> ^C
>>
>> real 1m43.673s
>> user 0m0.236s
>> sys 0m0.048s
>>
>>
>> So what am I doing wrong?
>
>I suggest playing with 'strace' to find some more facts about what is
>really happening.
>
>Regards,
>Gisle
--
--------------------------------------------------------
Derek J. Balling 408-530-5062
Technical Yahoo Do You Yahoo!?