in reply to CGI::Session::MySQL lock problem

I don't have a direct answer for you, but I do have a tip that might help. You may already know this, but I'd been using the Perl DBI about 8 months day-in and day-out before I discovered it.

DBI->trace() will turn on debugging for the mysql connection. You need to pass it a number, ->trace(1) is basic debugging.. the higher the number, the more debugging. Once you get up around 3 it gets really spammy and you should just log it to a file to read over after the script has run.

Set your trace and see what turns up. It might show you what's happening.

Replies are listed 'Best First'.
Re: Re: CGI::Session::MySQL lock problem
by fireartist (Chaplain) on Oct 16, 2003 at 14:32 UTC
    Thank you very much, that was so useful!

    I checked the trace log, found
    !! ERROR: '2006' 'MySQL server has gone away'
    checked what was happening just before it, found...
    <- disconnect= 1 at Images.pm line 215

    So, I add
    $self->param('session')->close;
    before
    $self->param('dbh')->disconnect();

    in my teardown sub, and it's fixed!