Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re^2: FastCGI DBI connect/disconnect

by afoken (Chancellor)
on Nov 13, 2016 at 10:04 UTC ( [id://1175807]=note: print w/replies, xml ) Need Help??


in reply to Re: FastCGI DBI connect/disconnect
in thread FastCGI DBI connect/disconnect

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". ;-)

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1175807]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (5)
As of 2024-04-25 16:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found