Search Postgresql Archives

Re: opened connection

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

 



On Sun, Sep 30, 2012 at 5:41 PM, Nathan Wagner <nw@xxxxxxxxxxxxxxx> wrote:
> On Sun, Sep 30, 2012 at 06:54:35PM +0200, Levente Kovacs wrote:
>> I've been using PostgreSQL for quite while, but I'd need some direction on
>> how to handle an opened socket to the database in longer periods.
>>
>> I open the connection to my database with PQconnectdb().
>>
>> I access the database, everything is fine. However, if I don't access the
>> database for a long time (measured in days), the connection is broken. I
>> get this error message:
>>
>> SQL action failed: 'FATAL:  terminating connection due to administrator
>> command SSL connection has been closed unexpectedly.
>
> Are you setting keepalives on the connection?  They should be on
> by default, but it's worth checking.  Perhaps they don't
> cooperate with SSL somehow.

I've had problems with ssl connections dying on me.  For slony
replication I had to make sure the connections were NOT ssl or they'd
die and subscriptions would just keep repeating after getting 80%
through and getting a connect error. This was with 8.4 on debian
lenny.


-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[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