Re: Connection Timeout Issue due to intermittent non-response of Postgre database - Mailing list pgsql-jdbc

From 이상원
Subject Re: Connection Timeout Issue due to intermittent non-response of Postgre database
Date
Msg-id CALFNBwc86ueiFq528jmeEMNkK0mearWMB3NaaY_5PdYWSxdpmQ@mail.gmail.com
Whole thread Raw
In response to Re: Connection Timeout Issue due to intermittent non-response of Postgre database  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Connection Timeout Issue due to intermittent non-response of Postgre database  (Dave Cramer <davecramer@postgres.rocks>)
List pgsql-jdbc
Thanks, I'll check it out. then, I will update to all.

2023년 11월 5일 (일) 오전 12:33, Tom Lane <tgl@sss.pgh.pa.us>님이 작성:
이상원 <swlee.kioplo@gmail.com> 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 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

pgsql-jdbc by date:

Previous
From: Tom Lane
Date:
Subject: Re: Connection Timeout Issue due to intermittent non-response of Postgre database
Next
From: Dave Cramer
Date:
Subject: Re: Connection Timeout Issue due to intermittent non-response of Postgre database