dbsrgits / dbix-class-schema-loader

Official GitHub remote for git.shadowcat.co.uk DBIx-Class-Schema-Loader.git
http://dbix-class.org/
11 stars 34 forks source link

DBIC-Schema-Loader incompatible with Apache threads. [rt.cpan.org #38600] #45

Open rabbiveesh opened 1 year ago

rabbiveesh commented 1 year ago

Migrated from rt.cpan.org#38600 (status was 'open')

Requestors:

Attachments:

From tjc@cpan.org on 2008-08-20 06:35:50 :

DBIx::Class::Loader 0.21 is not compatible with Apache running in
worker(threaded) mode on Linux, at least not on my tested environment,
which was:
DBIx::Class::Schema::Loader 0.04005
DBIx::Class 0.08010 and 0.08099_04
DBI 1.601 (and a slightly earlier)
DBD::Pg 2.8.6, 2.9.0 and another fairly older one.

Note that DBIx::Class::Schema works in the same configuration when used
without -Loader.

I attach a fairly complete demonstration app. See README for
setup/installation instructions.

Also, I note that this website seems to mention the problem and a
potential couple of fixes: http://d.hatena.ne.jp/holidays-l/20070126/p1
Unfortunately I can't read Japanese, but the code itself looks OK.

From tjc@cpan.org on 2008-08-20 06:43:37 :

Note that I've just tested against the current latest dev release, and
the problem remains.

From ribasushi@leporine.io on 2010-12-02 12:38:28 :

On Wed Aug 20 02:35:50 2008, TJC wrote:
> DBIx::Class::Loader 0.21 is not compatible with Apache running in
> worker(threaded) mode on Linux, at least not on my tested environment,
> which was:
> DBIx::Class::Schema::Loader 0.04005
> DBIx::Class 0.08010 and 0.08099_04
> DBI 1.601 (and a slightly earlier)
> DBD::Pg 2.8.6, 2.9.0 and another fairly older one.
> 
> Note that DBIx::Class::Schema works in the same configuration when used
> without -Loader.
> 
> I attach a fairly complete demonstration app. See README for
> setup/installation instructions.
> 
> 
> Also, I note that this website seems to mention the problem and a
> potential couple of fixes: http://d.hatena.ne.jp/holidays-l/20070126/p1
> Unfortunately I can't read Japanese, but the code itself looks OK.

Is this still a problem?

From tjc@cpan.org on 2010-12-03 02:34:43 :

On Thu Dec 02 07:38:28 2010, RIBASUSHI wrote:
> On Wed Aug 20 02:35:50 2008, TJC wrote:
> > DBIx::Class::Loader 0.21 is not compatible with Apache running in
> > worker(threaded) mode on Linux, at least not on my tested environment,
> > which was:
> > DBIx::Class::Schema::Loader 0.04005
> > DBIx::Class 0.08010 and 0.08099_04
> > DBI 1.601 (and a slightly earlier)
> > DBD::Pg 2.8.6, 2.9.0 and another fairly older one.
> > 
> > Note that DBIx::Class::Schema works in the same configuration when used
> > without -Loader.
> > 
> > I attach a fairly complete demonstration app. See README for
> > setup/installation instructions.
> > 
> > 
> > Also, I note that this website seems to mention the problem and a
> > potential couple of fixes: http://d.hatena.ne.jp/holidays-l/20070126/p1
> > Unfortunately I can't read Japanese, but the code itself looks OK.
> 
> Is this still a problem?

Took me a while to build a new VM and set it up with everything, since I don't run 
Apache any more, especially not the threaded version.

However - yes, I can confirm the problem still occurs on Ubuntu Maverick, with its 
versions of Apache (2.2), Perl (5.10.1), mod_perl, mpm_worker, and all the latest 
version of Perl modules installed from CPAN.

http://192.168.1.204/testdbic/loader

Caught exception in MyApp::Controller::Root->loader "DBD::Pg::db STORE failed: 
handle 2 is owned by thread 7f0ffc427bf0 not current thread 7f1002cd92c0 (handles 
can't be shared between threads and your driver may need a CLONE method added) at 
/usr/local/share/perl/5.10.1/DBIx/Class/Storage/DBI.pm line 217."

From tjc@cpan.org on 2010-12-03 02:39:20 :

BTW I opened another ticket (63558) about some warnings in the unit tests 
from DBIC about DCSL holding cached references when it shouldn't be..
I just wondered if maybe that's related to this bug, since if DCSL was 
closing the handles properly then the new threads would all re-open their 
own handles just fine.

Or maybe it's unrelated.