On Monday at 1:53pm, HR=>Haroon Rafique <[EMAIL PROTECTED]> wrote:

HR> 
HR> Problem:
HR> 
HR> I'm seeing that every call using LWP to any SSL site causes tcp sockets to
HR> linger (indefinitely) in CLOSE_WAIT state when I use mod_perl.


No bites, eh. Oh well! Can I interest anyone in testing this non mod_perl 
piece of code (which you can run on the command line) and see if you can 
reproduce my symptoms?

You will need perl, libwww-perl (LWP), IO::Socket::SSL, Net::SSLeay, 
OpenSSL and a strong willingness to help the open source community.

----------------------------------------
#!/usr/bin/perl

use strict;

if( $ENV{MOD_PERL} =~ /^mod_perl/ ) {
    my $r = shift;
    $r->content_type('text/html');
}

use LWP::UserAgent;
use HTTP::Request::Common qw(GET);

my $ua = LWP::UserAgent->new(keep_alive => 0);
my $req;
my $res;
#my $URL = 'https://www.rosi.utoronto.ca/';
my $URL = 'https://secure.worldgaming.net/';
$req = GET $URL;
$res = $ua->request($req);
print
    $res->is_success ?
    $res->content :
    'Error while getting ' . $res->request->uri . ' ' . $res->status_line;
sleep 20 if $ENV{MOD_PERL} !~ /^mod_perl/;
-------------------------------------------

Notice the sleep 20 at the end. Run this script on the command line and 
while its sleeping for 20 seconds, in another terminal, look for sockets 
in CLOSE_WAIT state, by running:

netstat -tanp | grep -i close_wait

If you see a socket in CLOSE_WAIT which disappears when the command line 
test program exits, then you have reproduced my bug, otherwise you were 
not able to. If you did reproduce it or otherwise, can you send an email 
to the list?

Regards,
--
Haroon Rafique
<[EMAIL PROTECTED]>

Reply via email to