perl-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stas Bekman <>
Subject Re: [mp2] Win32 apache2 "Restarting" under load
Date Thu, 02 Dec 2004 21:57:56 GMT
Ben Mehling wrote:
[Saw your this exact message on the users list, and hoped that someone who 
actually uses win32 will be able to give some advise, I guess that's not 
the case]

> We are running into some trouble porting an existing PERL app running
> under an older cgi accelerator (Blue Titan's Velocigen) on IIS to run
> under Apache2/mod_perl(1.99) on Win32.  We are testing on a Dell dual
> P4 xeon(ht), 1GB ram, running win2k3. The DB server is on a separate
> host, connecting via DBI/DBD::ODBC.
> Our application consists of a handful of perl scripts (.cat files,
> essentially .pl's) that call our own libraries (standard .pm files).
> The webapp runs fine under our install (Pre-compiled binary:
> Perl-5.8-win32-bin-0.8.exe through until we place a
> load on the server (using jMeter).
> Under load we are seeing multiple Apache restarts in the error logs
> (see below).  The error produced ("Parent: child process exited with
> status 3221226324 -- Restarting.") 

It's always fun with win32, which never gives proper error messages.

I'd start with figuring out what 3221226324 means. Ask on the apache users 
list? This is a generic Apache message, so it's not on our ground.

I can point you to server/mpm/winnt/mpm_winnt.c:

        else {
             int i;
             restart_pending = 1;
             ap_log_error(APLOG_MARK, APLOG_NOTICE, APR_SUCCESS, 
                          "Parent: child process exited with status %u -- 
Restarting.", exitcode);

It gets the message a few lines above, by calling
         if (!GetExitCodeProcess(event_handles[CHILD_HANDLE], &exitcode)) {

Once you figure out what that number means you will hopefully know the 
cause of the process exit.

Alternatively (or may be that process will give nothing useful), try to 
shrink your script to the very possible minimum and add debug prints and 
in that way you will see what was the last debug statement that was 
successful before dieing.

> when Apache dies led us to several
> mail list threads discussing 'non thread safe' modules (loaded into
> Apache) killing it in a similar way (with different status codes)...
> We searched through our various modules in use (Apache, Perl 5.8,
> mod_perl, Apache::DBI, DBI, DBD::ODBC, DBD::MySQL, Date::Calc,
> Net::SMTP) to find if any weren't thread safe.  Everything looked
> clean.  We couldn't find any reason to believe any of the modules
> weren't thread safe.

Looks clean? You mean you read through the XS and C code? Can you please 
share how did you come up with that conclusion? (I'd love to learn how to 
do that)

I'd also suggest to get rid of these errors:

 > [Tue Nov 23 11:30:47 2004] [error] Can't coerce array into hash at
 > (null) line 589.\n
 > [Tue Nov 23 11:30:47 2004] [error] Can't coerce array into hash at
 > (null) line 589.\n

It's quite possible that those are related. Add:

use Carp;
$SIG{__DIE__} = \&Carp::confess;

at, so you can see where it comes from (must be some eval).

Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker     mod_perl Guide --->

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message