Search Postgresql Archives

Re: db sever seems to be dropping connections

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On Mar 21, 2006, at 4:39 PM, Rushabh Doshi wrote:

This is my problem. I have a connection to the database using DB- >connect. Apparently, this connection sits idle for around an hour or so because of my application, and after that it has to do something. So I check that if the
handle is still a valid one or not. If it's not, then re-establish the

I see you're using DBI.

When you detect the dead connection, you need to close it immediately so that later on it will not attempt a disconnect. What you probably also want is to tell DBI not to try to do any cleanup on it since the connection is already lost. You do this by setting

 $dbh->{InactiveDestroy} = 1

before you undef $dbh.



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux