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 1qznjz-0014ZR-KI for pgsql-jdbc@arkaria.postgresql.org; Mon, 06 Nov 2023 00:45:19 +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 1qznjy-00BUta-6G for pgsql-jdbc@arkaria.postgresql.org; Mon, 06 Nov 2023 00:45:18 +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 1qznjx-00BUtS-VD for pgsql-jdbc@lists.postgresql.org; Mon, 06 Nov 2023 00:45:17 +0000 Received: from mail-pg1-x531.google.com ([2607:f8b0:4864:20::531]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1qznjv-004udl-O8 for pgsql-jdbc@lists.postgresql.org; Mon, 06 Nov 2023 00:45:17 +0000 Received: by mail-pg1-x531.google.com with SMTP id 41be03b00d2f7-5bd0631f630so2867192a12.0 for ; Sun, 05 Nov 2023 16:45:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1699231513; x=1699836313; darn=lists.postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=wrbAPZELzaL3UwZ0PyWYtwpbNwp9Yc8EH+WBgp1us8k=; b=nZ8NJzAqCJwlFHzuSSAoSksptCtn2fOd2kXlpVAIWuYZd5I25L8Edz+uKFOMQak5ML o1rAJKnoftF9/ktEpSnENTqeqofBQm2QDNptKabdmhcNsO8iX7DuBT8Bt4CgKUblcA/3 Bo+84wu5sfNGYV0ByhwXMDlbjzBp9mznkTAfiOFO40nRDB8s6TgZ6YBYI/CnYjDfShVl RIotveOMOnY2Cb/tWdciIbjz4kNJoq6XevEe5vVITSjVfnsjHlp5P2jpRI/wAwUUn/ff 55G29DJKqeLQKVN5v+FSanPJ32aPjdQBDBtT1XVs+MMavjN/I4zIs0TPiXdhglJ714iF pHqQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699231513; x=1699836313; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=wrbAPZELzaL3UwZ0PyWYtwpbNwp9Yc8EH+WBgp1us8k=; b=lTuznAzzwvj14jlUZKuvuRHSCpCGMsVD+17+ZX9hd+Ah1RtlbTq0IOR99IlMMR/KLL t3Bm/JMIeEqmafKAO4U/3a0wfeqyl+CNhrFlZp2hLKvGNKOAuykNYHccyQ+o1DmfeRPO updvCnU4xbzA3mP8LjSd0dk26jelL0N48Au77F+GN6kvV/PXvl3F9rRRCt7EYt4mLF2J +4Jpc3OdylXpEkoi7jqaLE+gZ2iAvxrD9W/ppksia6/fdIpoH75P5iyrOQZwx1IinylI F63n8dP9IFnHxnOSz1evaYhqhXJ/ZC0IqlpZY4x6AdLD2MGOArTEa/GdJVRKMwWCqL1o sV9w== X-Gm-Message-State: AOJu0YwnMyw3RA0nGwq6RxgGMjp3M0gDDREeYgEzAEvK7gTYTXYtMg3f mooAvs0/trUQX6+XT9IXkXQj2uIOkr3rCz9tXmJj6myOzzbfOg== X-Google-Smtp-Source: AGHT+IFU3ZhI3ytOxw2xqPlA6Xzvj2uHAFLpou7QtRgylM+oT9+eGm55lvInQFp3A7pg6xyIJLVIGcHwQvlyGfIy2IU= X-Received: by 2002:a17:90b:3a8d:b0:280:892a:75ab with SMTP id om13-20020a17090b3a8d00b00280892a75abmr12393218pjb.10.1699231512682; Sun, 05 Nov 2023 16:45:12 -0800 (PST) MIME-Version: 1.0 References: <3477789.1699111986@sss.pgh.pa.us> In-Reply-To: <3477789.1699111986@sss.pgh.pa.us> From: =?UTF-8?B?7J207IOB7JuQ?= Date: Mon, 6 Nov 2023 09:45:00 +0900 Message-ID: Subject: Re: Connection Timeout Issue due to intermittent non-response of Postgre database To: Tom Lane Cc: pgsql-jdbc@lists.postgresql.org Content-Type: multipart/alternative; boundary="000000000000b465a60609712aec" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --000000000000b465a60609712aec Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 occurren= ce > > of connection timeouts and they do not repeat continuously. Not easy to > > 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. > > regards, tom lane > --000000000000b465a60609712aec Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
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.

=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 regards, tom lane
--000000000000b465a60609712aec--