Apache-Watchdog-RunAway
view release on metacpan or search on metacpan
variable:
% MOD_PERL=1 perl Makefile.PL -httpd /path/to/apache/bin/httpd
% make
% make test
% make install
*** mod_perl 2.0 ***
You can't use this module with threaded mpms. Since when a process is
killed all threads in it will be killed.
% perl Makefile.PL MOD_PERL=2 -httpd /path/to/apache2/bin/httpd
% make
% make test
% make install
replace /path/to/apache/bin/httpd with a path to your apache 2.0 httpd
server, which was built with mod_perl 2.0.
An alternative way to tell Makefile.PL that you want mod_perl 2.0 is
if (MP2) {
require APR::Pool;
} else {
# nada
}
}
use Apache::Scoreboard ();
use Symbol ();
if (MP2 && require Apache::MPM && Apache::MPM->is_threaded()) {
die __PACKAGE__ . " is suitable to be used only under prefork MPM";
}
use subs qw(debug log_error);
########## user configurable variables #########
# timeout before counted as hang (in seconds)
# 0 means deactivated
$Apache::Watchdog::RunAway::TIMEOUT = 0;
# sub-class Apache::TestRunPerl
package MyTest;
# 5.005-compat
BEGIN {
require Apache::TestRunPerl;
@MyTest::ISA = qw(Apache::TestRunPerl);
}
# so we get a nice view of procs/threads
use constant MIN_MAXCLIENTS => 5;
# subclass new_test_config to add some config vars which will be
# replaced in generated httpd.conf
sub new_test_config {
my $self = shift;
$self->{conf_opts}->{maxclients} ||= MIN_MAXCLIENTS;
return $self->SUPER::new_test_config;
( run in 0.350 second using v1.01-cache-2.11-cpan-3cd7ad12f66 )