Discussion:
DESTROY ignored for outer handle
Nikos Vaggalis
2015-04-28 06:16:48 UTC
Permalink
I've tried posting to the perl.dbi google group to no avail,so I'm trying
here as well

My dbi trace log is full of <> DESTROY(DBI::db=HASH(0x38bd330)) ignored for
outer handle (inner DBI::db=HASH(0x3817a48) has ref cnt 1)

In detail:
I'm building a site and there are two queries each one in its own sub, the
first one
which populates some elements like drop down
select menus,sliders etc

When the user makes a choice the second query is fired through an Ajax call:
$.ajax({
url: '/query2',
type: "POST",

data: AllData(1)}).success(function(data){
$("#contentx").append(data);
});

which populates a #contentx div with the results of the query.

Now,when in the same session, the error does not occur no matter how much I
stress it. When opening another 4-5 sessions,or doing a couple of reloads
of the same session, the following DBI error comes up :

<-- dbd_st_finish
1 <- fetch= ( undef ) [1 items] row1 at
/home/starman/perl5/perlbrew/perls/perl-5.18.1/lib/site_perl/5.18.1/x86_64-linux/DBD/
mysql.pm line 867 via at /home/starman/Foo/bin/../lib/MySite/Model.pm
line 219
<- fetchrow_hashref= ( undef ) [1 items] row1 at
/home/starman/Foo/bin/../lib/MySite/Model.pm line 219 via at
/home/starman/Foo/bin/../lib/Foo.pm line 34
<> DESTROY(DBI::st=HASH(0x3fcfc60)) ignored for outer handle (inner
DBI::st=HASH(0x3fcfac8) has ref cnt 1)
-> DESTROY for DBD::mysql::st (DBI::st=HASH(0x3fcfac8)~INNER)
<- DESTROY= ( undef ) [1 items] at /home/starman/Foo/bin/../lib/Foo.pm
line 34 via at /home/starman/Foo/bin/../lib/Foo.pm line 34
DESTROY (dbih_clearcom) (sth 0x3fcfac8, com 0x41e4d70, imp
FLAGS 0x180191: COMSET Warn RaiseError PrintError PrintWarn
PARENT DBI::db=HASH(0x3d23dc0)
KIDS 0 (0 Active)
NUM_OF_FIELDS 38
NUM_OF_PARAMS 0
dbih_clearcom 0x3fcfac8 (com 0x41e4d70, type 3) done.
<> DESTROY(DBI::db=HASH(0x3d18b00)) ignored for outer handle (inner
DBI::db=HASH(0x3d23dc0) has ref cnt 1)
-> DESTROY for DBD::mysql::db (DBI::db=HASH(0x3d23dc0)~INNER)
imp_dbh->pmysql: 42d7440
<- DESTROY= ( undef ) [1 items] at /home/starman/Foo/bin/../lib/Foo.pm
line 34 via at /home/starman/Foo/bin/../lib/Foo.pm line 34
DESTROY (dbih_clearcom) (dbh 0x3d23dc0, com 0x418e4e0, imp
FLAGS 0x180391: COMSET Warn RaiseError PrintError PrintWarn
AutoCommit
PARENT DBI::dr=HASH(0x3c85940)
KIDS 0 (0 Active)
IMP_DATA HASH(0x3d23478)
dbih_clearcom 0x3d23dc0 (com 0x418e4e0, type 2) done.
"
and the site breaks. Is that a concurrency issue having to do with thread
safety or forking the handles?
The same error happens either in a preforked http server environment
(Starman) or a non-preforked one (HTTP::Server::Simple::PSGI)

Setup
DBD:mysql 4.031
DBI 1.633 (DBI 1.633-nothread)
Dancer2 0.158000
Starman,Plack
Ubuntu 14.04 x86_64 x86_64 x86_64 GNU/Linux

Any help deeply appreciated
Tim Bunce
2015-04-28 17:09:38 UTC
Permalink
Post by Nikos Vaggalis
Now,when in the same session, the error does not occur no matter how much I
stress it. When opening another 4-5 sessions,or doing a couple of reloads
I don't see any errors in that log. I suggest you enable RaiseError, if
you haven't already, then any errors will be obvious.

("DESTROY ignored for outer handle" is an internal detail that's almost
certainly irrelevant to whatever problem you're having.)

Tim.
Nikos Vaggalis
2015-04-28 21:22:46 UTC
Permalink
Hi Tim and thanks a lot for replying
I have RaiseError enabled,I don't see anything else.Is it ok if I send you
the whole log file just to take a quick look?
Should Mysql be setup with the with-thread-safe-client switch enabled?
thanks
Post by Nikos Vaggalis
Post by Nikos Vaggalis
Now,when in the same session, the error does not occur no matter how
much I
Post by Nikos Vaggalis
stress it. When opening another 4-5 sessions,or doing a couple of
reloads
I don't see any errors in that log. I suggest you enable RaiseError, if
you haven't already, then any errors will be obvious.
("DESTROY ignored for outer handle" is an internal detail that's almost
certainly irrelevant to whatever problem you're having.)
Tim.
Tim Bunce
2015-04-29 14:25:43 UTC
Permalink
Your original mail referred to DBI errors yet there are no DBI errors.

I suggest you ignore the DBI trace and focus on reproducing whatever
problem you're having and explore how it's affected by changing things
like the number of backend worker processes. Aim to come up with a clear
and precise statement of the problem behaviour, the circumstances, and
what you've explored changing and what effect it had.

Post again here if you find there is a problem related to the DBI.
Otherwise perhaps a more general web development forum would be more help.

Good luck.

Tim.
Post by Nikos Vaggalis
Hi Tim and thanks a lot for replying
I have RaiseError enabled,I don't see anything else.Is it ok if I send you the whole log file just to
take a quick look?
Should Mysql be setup with the with-thread-safe-client switch enabled?
thanks
Post by Nikos Vaggalis
Now,when in the same session, the error does not occur no matter how much I
stress it. When opening another 4-5 sessions,or doing a couple of reloads
I don't see any errors in that log. I suggest you enable RaiseError, if
you haven't already, then any errors will be obvious.
("DESTROY ignored for outer handle" is an internal detail that's almost
certainly irrelevant to whatever problem you're having.)
Tim.
References
Visible links
Loading...