in reply to Class::DBI explodes on mod_perl/Win32 due to Clone
I need to share how I solved a similar problem with Package::Stash. Active Perl 5.10.1 Win32, mod_perl 2.0.4. It's a webapp using Template::Toolkit to render the user interface. I have the same "Free to wrong pool" message in Apache's error log.
For example: Free to wrong pool 2248d88 not 2264038 at X:/Path_to_Perl_site_lib/Package/Stash.pm line 40.. Each one triggered an Apache restart like this: [notice] Parent: child process exited with status 255 -- Restarting.
After a lot of research on Google and reading obscure posts about how Apache, mod_perl and XS manage threads on Win32, I went to Stash.pm and noticed it chooses between a Pure Perl and an XS implementation around line 24:
for my $impl ('XS', 'PP') { if (eval "require Package::Stash::$impl; 1;") { $IMPLEMENTATION = $impl; last; } else { $err .= $@; } }
I simply switched 'XS' and 'PP' around in this for loop and now it chooses the Pure Perl implementation first. Problem solved. I restarted Apache and the error log don't show the "Free to wrong pool" message anymore.
Thanks to the monks who reported this problem here and helped me solve a similar issue!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Class::DBI explodes on mod_perl/Win32 due to Clone
by ribasushi (Pilgrim) on Dec 10, 2012 at 10:20 UTC | |
by GeneralElektrix (Acolyte) on Jul 22, 2013 at 14:35 UTC |