Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1r0llN-007jTx-3w for pgsql-jdbc@arkaria.postgresql.org; Wed, 08 Nov 2023 16:50:45 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1r0llK-005sjp-Uv for pgsql-jdbc@arkaria.postgresql.org; Wed, 08 Nov 2023 16:50:42 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1r0llK-005sjf-NV for pgsql-jdbc@lists.postgresql.org; Wed, 08 Nov 2023 16:50:42 +0000 Received: from pgintl.fastcrypt.com ([149.56.129.164]) by magus.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1r0llI-005Nm3-1k for pgsql-jdbc@lists.postgresql.org; Wed, 08 Nov 2023 16:50:42 +0000 Received: from mail-ej1-f41.google.com (mail-ej1-f41.google.com [209.85.218.41]) by pgintl.fastcrypt.com (Postfix) with ESMTPSA id 83CF3202C5 for ; Wed, 8 Nov 2023 11:50:36 -0500 (EST) Received: by mail-ej1-f41.google.com with SMTP id a640c23a62f3a-9d2e6c8b542so1088759266b.0 for ; Wed, 08 Nov 2023 08:50:36 -0800 (PST) X-Gm-Message-State: AOJu0YxiNqvtGbOU6zP9q/z+iDOoADMzeFrjK/cK6N2zLkQksO2qfXWc 5kULrDIlG70aqSIY08SXihVDmqdDI+yutZQnm/k= X-Google-Smtp-Source: AGHT+IHqRECV2eJiv43gsfHjY9kuwnrNIf6ZyeKDkNlojGSa9jmHHvJ7ugTiN3IVtSpBQ/ruFFu0pMq8737ZHPlfgKU= X-Received: by 2002:a17:907:7255:b0:9de:dc3d:3b2 with SMTP id ds21-20020a170907725500b009dedc3d03b2mr2118920ejc.16.1699462235141; Wed, 08 Nov 2023 08:50:35 -0800 (PST) MIME-Version: 1.0 References: <3477789.1699111986@sss.pgh.pa.us> In-Reply-To: From: Dave Cramer Date: Wed, 8 Nov 2023 11:50:18 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: Connection Timeout Issue due to intermittent non-response of Postgre database To: =?UTF-8?B?7J207IOB7JuQ?= Cc: Tom Lane , pgsql-jdbc@lists.postgresql.org Content-Type: multipart/alternative; boundary="000000000000d5c27f0609a6e27c" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --000000000000d5c27f0609a6e27c Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Sun, 5 Nov 2023 at 19:45, =EC=9D=B4=EC=83=81=EC=9B=90 wrote: > Thanks, I'll check it out. then, I will update to all. > > 2023=EB=85=84 11=EC=9B=94 5=EC=9D=BC (=EC=9D=BC) =EC=98=A4=EC=A0=84 12:33= , Tom Lane =EB=8B=98=EC=9D=B4 =EC=9E=91=EC=84=B1: > >> =3D?UTF-8?B?7J207IOB7JuQ?=3D writes: >> > The Postgre database does not respond intermittently, causing a >> connection >> > timeout in the Spring Framework. There is no regularity in the >> occurrence >> > of connection timeouts and they do not repeat continuously. Not easy t= o >> > track. >> >> I'd try turning on statement logging, and maybe also statement duration >> logging, and then matching up the times of observed client-side outages >> with what's happening according to the postmaster log. Connection >> and disconnection logging might be useful too. >> >> A likely bet about the root cause is an unreasonably short connection >> timeout in some network infrastructure between your client and the >> database server. That would manifest as both sides reporting that the >> other side disconnected (not necessarily at the same time, but for the >> same connection). If so, it could likely be cured by adjusting the >> database's TCP keepalive settings. But you ought to gather data >> first. >> > I would have to agree that it is very likely a network issue. Dave --000000000000d5c27f0609a6e27c Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


On Sun, 5 Nov 2023 at 19:45, = =EC=9D=B4=EC=83=81=EC=9B=90 <s= wlee.kioplo@gmail.com> wrote:
Thanks, I'll check it out. then, = I will update to all.

2023=EB=85=84 11=EC=9B=94 5=EC=9D=BC (=EC=9D=BC) = =EC=98=A4=EC=A0=84 12:33, Tom Lane <tgl@sss.pgh.pa.us>=EB=8B=98=EC=9D=B4 =EC=9E=91=EC= =84=B1:
=3D?UTF-= 8?B?7J207IOB7JuQ?=3D <swlee.kioplo@gmail.com> writes:
> The Postgre database does not respond intermittently, causing a connec= tion
> timeout in the Spring Framework. There is no regularity in the occurre= nce
> of connection timeouts and they do not repeat continuously. Not easy t= o
> track.

I'd try turning on statement logging, and maybe also statement duration=
logging, and then matching up the times of observed client-side outages
with what's happening according to the postmaster log.=C2=A0 Connection=
and disconnection logging might be useful too.

A likely bet about the root cause is an unreasonably short connection
timeout in some network infrastructure between your client and the
database server.=C2=A0 That would manifest as both sides reporting that the=
other side disconnected (not necessarily at the same time, but for the
same connection).=C2=A0 If so, it could likely be cured by adjusting the database's TCP keepalive settings.=C2=A0 But you ought to gather data first.

I would have = to agree that it is very likely a network issue.

D= ave
--000000000000d5c27f0609a6e27c--