Debugging mod_perl Perl Internals
This document explains how to debug Perl code under mod_perl.
Most of the mod_perl 1.0 debug documentation applies to mod_perl 2.0:
See Hanging Processes: Detection and Diagnostics for the explanation, but under mp2 to use signals to detect where the process is spinning, you can't use $SIG{USR2}, you have to use POSIX signals. i.e. the code becomes:
$SIG{USR2}
use Carp (); use POSIX qw(SIGUSR2); my $mask = POSIX::SigSet->new( SIGUSR2 ); my $action = POSIX::SigAction->new(\&tell_where_spinning, $mask); my $oldaction = POSIX::SigAction->new(); POSIX::sigaction(SIGUSR2, $action, $oldaction ); sub tell_where_spinning { Carp::confess("caught SIGUSR2!"); };
and then:
% kill USR2 <pid_of_the_spinning_process>
and watch for the trace in error_log.
Maintainer is the person(s) you should contact with updates, corrections and patches.
Stas Bekman [http://stason.org/]
Only the major authors are listed above. For contributors see the Changes file.
To install mod_perl2, copy and paste the appropriate command in to your terminal.
cpanm
cpanm mod_perl2
CPAN shell
perl -MCPAN -e shell install mod_perl2
For more information on module installation, please visit the detailed CPAN module installation guide.