Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ob1uK-00008l-NQ for pgsql-general@arkaria.postgresql.org; Wed, 21 Sep 2022 15:45:04 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1ob1uJ-0008Ur-MD for pgsql-general@arkaria.postgresql.org; Wed, 21 Sep 2022 15:45:03 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ob1uJ-0008UW-AK for pgsql-general@lists.postgresql.org; Wed, 21 Sep 2022 15:45:03 +0000 Received: from mail-pj1-x1029.google.com ([2607:f8b0:4864:20::1029]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1ob1uG-0003SY-PW for pgsql-general@lists.postgresql.org; Wed, 21 Sep 2022 15:45:02 +0000 Received: by mail-pj1-x1029.google.com with SMTP id j6-20020a17090a694600b00200bba67dadso6280533pjm.5 for ; Wed, 21 Sep 2022 08:45:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:from:to:cc:subject:date; bh=6T+t4YMggXDyul/s+iT3d/dzdXlL19cCUZR0qzBfi4g=; b=A/BlwSMqKFQ/IZEdkH3Y+tnG8jMqGLeapFb1H53Z7xE3JhSqDJ9YKUFfwZ60eTXIOv xxTUJE3hwENtEvjqfHnVoggCKDh46QsSeqj5FZIoVEEVlDD4mz+l+LIdqxQp934lK5zX /ST5XD+TLofcbDQyXLGPN8HjH+TQlEVOayJrfXFJ8JBqHekBqHoubv4jISLWhwgTRuPa k0UmROGFlSeQpeCd82jOEPlTr1aHFzBAUG3gwEgCbssffNuGzltgAZzMOh68mTiYU7Bw zFNP0IP1feQD7pnt7xh7mS/NHdEoLrlLuk497mMmL3uOGRhTWh7wDWB8VRWNUV2zl1+j VKHw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date; bh=6T+t4YMggXDyul/s+iT3d/dzdXlL19cCUZR0qzBfi4g=; b=W9i1XoOlMo9lmxAe0NqwKMsHD8htdiCQZAILSrJwj92mJz4eO5maHg8K+RkqycCT/+ uNMGzHus8CUXFWuv2L0s6uHpqQowE6Gwkk/cVRyPOgGELUNTh6cXwlwAYVJ39IKYxUoj MAI4133zOKjEVUzU0vIzZATTu3ErBCPyXsxnX8VHRuXAkVbESk86wJdeQu2PpWhTD7RH 9XIshYFzW43lLu/T4D2K+4IBCfxVBUFkg+UI6iKO2/h8jRLCSO2d3T3eyGLfWwABdyoa jR02uGN3ROCmk5SRe/s5H13VxpAF3LZz3sBgtwEVeuf5W3hmdZ+btnc6ZudaylmU+tFZ S2Dg== X-Gm-Message-State: ACrzQf1wXKvMVbHbilLr2yPL/N5hkZDSueyh59xAYS0U6oK8koZnD+VE loS+go/1FETSJfjEiKzmAXc= X-Google-Smtp-Source: AMsMyM74WkQu9DHjzeCcFym3kCX/XPMH7htlJIsuZbRNAZT86IN2g24z7YNS1WMK/Yot3kwRux++bQ== X-Received: by 2002:a17:90b:1b46:b0:203:a2c7:2327 with SMTP id nv6-20020a17090b1b4600b00203a2c72327mr10279550pjb.91.1663775099431; Wed, 21 Sep 2022 08:44:59 -0700 (PDT) Received: from smtpclient.apple ([76.140.27.218]) by smtp.gmail.com with ESMTPSA id m20-20020a170902bb9400b001635b86a790sm2213705pls.44.2022.09.21.08.44.58 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 21 Sep 2022 08:44:59 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.13\)) Subject: Re: tcp settings From: Rob Sargent In-Reply-To: <971597.1663732986@sss.pgh.pa.us> Date: Wed, 21 Sep 2022 09:44:56 -0600 Cc: "pgsql-generallists.postgresql.org" Content-Transfer-Encoding: quoted-printable Message-Id: <9D6C46C0-8840-4775-9E94-B2755E50CB16@gmail.com> References: <934612.1663716103@sss.pgh.pa.us> <971597.1663732986@sss.pgh.pa.us> To: Tom Lane X-Mailer: Apple Mail (2.3654.120.0.1.13) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk > On Sep 20, 2022, at 10:03 PM, Tom Lane wrote: >=20 > Rob Sargent 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? >=20 >> Sitting idle for not even a long while. Under half hour I feel would = do it. But I don=E2=80=99t think it times out while I=E2=80=99m = =E2=80=9CSQLing=E2=80=9D >=20 > 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: >=20 > $ cat /proc/sys/net/ipv4/tcp_keepalive_time > 7200 >=20 > but it sounds like there's something between you and the database > server that will forget connections a lot quicker than that. >=20 > regards, tom lane I was afraid you would conclude that. But its just plain ol=E2=80=99 = psql (inside emacs) on interactive node directly to db server node, all = in a =E2=80=9Cprotected environment=E2=80=9D. There could be network = pieces in the middle that are getting uppity. I=E2=80=99ll ask /them/. Thanks =20=