laziness, impatience, and hubris | |
PerlMonks |
Re^2: FastCGI DBI connect/disconnectby afoken (Chancellor) |
on Nov 13, 2016 at 10:04 UTC ( [id://1175807]=note: print w/replies, xml ) | Need Help?? |
Alternately, if you really wanted to, you could create $dbh outside of your while (CGI::Fast->new) { ... } loop, I would really avoid that in a FastCGI context. A clean disconnect should also either commit or rollback all transactions still open, so every HTTP request sees a clean database connection with no outstanding transactions or other side-effects of a previous request. Alexander
-- Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)
In Section
Seekers of Perl Wisdom
|
|