perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From André Warnier>
Subject Re: re-post : duplicate sockets with mp2, apache2, linux
Date Fri, 21 Sep 2007 07:39:21 GMT
Perrin Harkins wrote:
> Also, have you tried running your code in the debugger to try to see
> when the second socket appears?
Hee, no.  This is an Apache2 PerlAuthenHandler.  How do I run that under 
the debugger ?  (I am not at all familiar with the debugger per se, so 
if this is a big setup, it might be more efficient to go another route.)

 From the logfile of the database module (the external server to which I 
connect from the handler), I do see when the two sockets appear though : 
at the same second or within 1 second of one another.  I can also see 
that one of these sockets indeed receives what the handler sends it as a 
request, while the other one receives nothing.

Now, assuming for a moment that indeed the handler opens the connection 
only once (what I see in the Apache logfile), and that the external 
target server sees two connections being opened (what I see in its 
logfile); and assuming that the handler itself is called only once at 
the proper time (what I also see in the Apache logfile), then what 
conceivable explanation could there be ?
I mean, purely in the abstract, is there any circumstance in which a 
single execution of an IO::Socket::INET->new() or a "socket() + 
connect()" could possibly open 2 connections to the same destination ?

Or else : does anyone know of another simple-to-set-up mod_perl/Apache2 
module that opens a connection to an external server, and which I could 
run to see if it does the same kind of thing ?

View raw message