Re: PSQLException: An I/O error occurred while sending to the backend. - Mailing list pgsql-general

From Tom Lane
Subject Re: PSQLException: An I/O error occurred while sending to the backend.
Date
Msg-id 1386310.1596119205@sss.pgh.pa.us
Whole thread Raw
In response to PSQLException: An I/O error occurred while sending to the backend.  (Argha Deep Ghoshal <ghoshal.arghadeep@gmail.com>)
Responses Re: PSQLException: An I/O error occurred while sending to the backend.
List pgsql-general
Argha Deep Ghoshal <ghoshal.arghadeep@gmail.com> writes:
> We are using PostgreSQL 11 wherein intermittently the below exception is
> popping up, causing our application to lose connection with the database.
> It isn't reconnecting until the application is restarted.

>     org.postgresql.util.PSQLException: An I/O error occurred while sending
> to the backend.

That certainly looks like loss of network connection.  Had the connection
been sitting idle for awhile before this query attempt?

> We have checked the PostgreSQL logs in detail, however we are unable to
> find any significant errors related to this issue.

I'd expect that the backend would eventually notice the dead connection.
But the timeout before it does so might be completely different from the
time at which the client notices the dead connection, so the relationship
might not be very obvious.

> All the servers are present in the same region and building.

Doesn't mean there's not routers or firewalls between them.  I'd start
by looking for network timeouts, and possibly configuring the server
to send TCP keepalives more aggressively.  (In this case it might be
HAProxy that needs to be sending keepalives ... don't know what options
it has for that.)

            regards, tom lane



pgsql-general by date:

Previous
From: Diego
Date:
Subject: Re: Track pgsql steps
Next
From: Pavel Stehule
Date:
Subject: Re: How to find out why user processes are using so much memory?