Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: Dancer app losing DB connection

by sundialsvc4 (Abbot)
on Aug 19, 2014 at 01:53 UTC ( #1097924=note: print w/ replies, xml ) Need Help??


in reply to Dancer app losing DB connection

What I did successfully, although it wasn’t in Dancer, was to create a wrapper-class that was used to carry out all DB operations.   Internally, it wrapped all SQL operations in an eval { ... } block in order to trap errors.   If an error was caught, it destroyed the existing database handle by attempting a courtesy disconnect, then setting the handle to undef, then attempted to reconnect.   Everything was bulletproofed so that the object always maintained control and awareness of the present-state.   All of this (fairly complicated) logic was wrapped-up in the methods of the object that the entire applicatioin used, in lieu of direct DBI-calls, to perform all kinds of database access.   (All credentials, etc. were provided by private methods of that object so that secrets would not persist in memory.)


Comment on Re: Dancer app losing DB connection
Re^2: Dancer app losing DB connection
by Anonymous Monk on Aug 19, 2014 at 03:53 UTC
    And this is relevant how? Different how?
Re^2: Dancer app losing DB connection
by Anonymous Monk on Aug 19, 2014 at 18:45 UTC
    All credentials, etc. were provided by private methods of that object so that secrets would not persist in memory.

    I can only pray that you know that that "private methods" have nothing to do with whether or not secrets are kept in memory or not. I hope that you're just really glossing over security details here, which is a questionable practice too - what if someone reads this and understands "private" methods to be some kind of real security measure?

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (15)
As of 2014-10-20 13:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (77 votes), past polls