perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <e...@woh.rr.com>
Subject Getting graceful signal delivered to worker processes and IP on Server Status page
Date Tue, 04 May 2010 18:12:11 GMT
I have two related questions.

1) I have an instance where I use mod_perl to handle persistent connections.  This is done
under Linux and Apache 2.2.15.  There are multiple servers and multiple children under each
server.

If I send a graceful, it seems like the parent gets the signal but the children do not.  Since
these are persistent connections, if I could get the signal sent down to the children, I could
handle it and cause each child to exit gracefully.  I do show the signal is getting delivered
as I enabled the Apache2::ServerUtil::server_shutdown_cleanup_register to call a function
and log the signal but I see one instance written to the log and not one per server.  How
can this be done?

2) I would also like to know if I can do anything about the status page showing more information
about those persistent connections.  The Client and VHost show '?' and the Request shows '..reading..'.
 These children are always in the read state until they receive data.  They then process the
data, send the response, then go back to read until the client disconnects.  I would like
to know if it is possible for the Client IP to show up on the status page.  Currently the
status lines look like:

Srv          PID         Acc         M            CPU       SS           Req        Conn 
   Child      Slot        Client    VHost    Request
0-0          4021       0/0/0     R             0.00        23628    0              0.0  
       0.00        0.00        ?              ?              ..reading..
0-0          4021       0/0/0     R             0.00        22517    0              0.0  
       0.00        0.00        ?              ?              ..reading..
0-0          4021       0/0/0     R             0.00        9085       0              0.0
         0.00        0.00        ?              ?              ..reading..
0-0          4021       0/0/0     R             0.00        2367       0              0.0
         0.00        0.00        ?              ?              ..reading..

I would like to see the client show up like:

Srv          PID         Acc         M            CPU       SS           Req        Conn 
   Child      Slot        Client    VHost    Request
0-0          4021       0/0/0     R             0.00        23628    0              0.0  
       0.00        0.00        10.1.1.2 ?             ..reading..

Is this an issue in mod_perl not setting the ws_record->client?  I do have access to the
remote IP via $connection->remote_ip so why is it not showing up in the status page?  I
did try to modify the line in mod_status to show the client and vhost if the status was SERVER_BUSY_READ
but nothing shows up like:

Srv          PID         Acc         M            CPU       SS           Req        Conn 
   Child      Slot        Client    VHost    Request
0-0          4021       0/0/0     R             0.00        23628    0              0.0  
       0.00        0.00                                        ..reading..


Mime
View raw message