FW: Handling idle database connections

"Manikantan, Madhunapanthula_Naaga" <[email protected]>
Newsgroups gmane.comp.lang.perl.modules.dbi.sybase.devel
Message-ID <1485868F0AD5AC4EB1A9047C9D6FFCE09B769F68@MAILNYCMB6A.winmail.deshaw.com>
DBI-dev , can you please take a look and opine?

Thanks a lot !!
Manikantan

_____________________________________________
From: Manikantan, Madhunapanthula_Naaga
Sent: Saturday, January 26, 2013 1:31 AM
To: '[email protected]'
Subject: Handling idle database connections


Hello dbi-users,

I have a ton of PERL scripts that open a database connection, do some database related work for 5 to 10 mts and go on with other work for 2 to 3 days.  This means, the database connection will be idle after 5 mts but still exists for 2-3 days.  This can potentially choke my server once all the available threads are consumed.  I think the right approach is for the developer to disconnect once he is done with database work. Since I have no control over the scripts, I want to explore the below.

I was wondering if there is any option to DBI that will say " if the connection is idle for say 'X' mts disconnect automatically and set state accordingly. On subsequent call to $dbh it can check the state and re-establish connection as necessary".

This will alleviate lot of my issues and any help/suggestion in this regard is greatly appreciated !!!

Thanks a lot !!!
Manikantan.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.