Re: tcp settings

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Rob Sargent <robjsargent(at)gmail(dot)com>
Cc: "pgsql-generallists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: tcp settings
Date: 2022-09-21 04:03:06
Message-ID: 971597.1663732986@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Rob Sargent <robjsargent(at)gmail(dot)com> writes:
>> then keepalives aren't necessarily the solution anyway. When is
>> this failure occurring ... is it while trying to establish the
>> database connection in the first place? Or does it only happen
>> if you've left the psql session sit idle for a long while?

> Sitting idle for not even a long while. Under half hour I feel would do it. But I don’t think it times out while I’m “SQLing”

OK, that does sound like something that reducing the keepalive
interval could help with. The traditional keepalive timeout
is a couple of hours, at least on my Linux box:

$ cat /proc/sys/net/ipv4/tcp_keepalive_time
7200

but it sounds like there's something between you and the database
server that will forget connections a lot quicker than that.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Laurenz Albe 2022-09-21 09:26:12 Re: PostgreSQL Rule does not work with deferred constraint.
Previous Message Louis Tian 2022-09-21 01:19:15 PostgreSQL Rule does not work with deferred constraint.