Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling

Re: Class::DBI explodes on mod_perl/Win32 due to Clone

by GeneralElektrix (Acolyte)
on Oct 03, 2012 at 19:39 UTC ( #997122=note: print w/replies, xml ) Need Help??

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/ 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 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 (Monk) on Dec 10, 2012 at 10:20 UTC
    Could you please provide more information about this issue? The authors would like to have this fixed, but more details are needed. Corresponding RT ticket #81861
      More information? The only information I didn't give is the source code for my application. I could share some if necessary. Please tell me what more you'd like to have and I will see what I can do.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://997122]
[Corion]: This evening, I'll kill that wrapper again, and just call LoadFile() in the plugin class directly instead of creating a go-between object for no real gain.
[Corion]: Writing these import plugins was really nice though - in about 2 hours, I had imports for CSV, YAML and JSON, and adding XLS(X), SQLite (or DBI) data sources is also trivial. I'm idly wondering about separating the plugin into transport+parser, so ...
[Corion]: ... http:// URLs could be retrieved and then parsed, but I think that that would be overkill for a toy static site generator ;)

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (11)
As of 2018-05-22 11:08 GMT
Find Nodes?
    Voting Booth?