Re: An I/O error occurred while sending to the backend (PG 13.4) - Mailing list pgsql-performance

From Justin Pryzby
Subject Re: An I/O error occurred while sending to the backend (PG 13.4)
Date
Msg-id 20220224020005.GT9008@telsasoft.com
Whole thread Raw
In response to RE: An I/O error occurred while sending to the backend (PG 13.4)  ("ldh@laurent-hasson.com" <ldh@laurent-hasson.com>)
Responses Re: An I/O error occurred while sending to the backend (PG 13.4)  (Justin Pryzby <pryzby@telsasoft.com>)
List pgsql-performance
You originally mailed about an error on the client, and now you found
corresponding server logs, which suggests a veritable network issue.

Are the postgres clients and server on the same subnet ?  If not, what are the
intermediate routers ?  Is there any NAT happening ?  Do those devices have any
interesting logs that correspond with the server/client connection failures ?

Have you tried enabling TCP keepalives ?  This might help to convince a NAT
device not to forget about your connection.

https://www.postgresql.org/docs/current/runtime-config-connection.html
tcp_keepalives_idle=9
tcp_keepalives_interval=9
tcp_keepalives_count=0
tcp_user_timeout=0 -- You apparently have this set, but it cannot work on windows, so just generates noise.

On linux, you can check the keepalive counters in "netstat -not" to be sure
that it's enabled.  A similar switch hopefully exists for windows.

-- 
Justin



pgsql-performance by date:

Previous
From: Justin Pryzby
Date:
Subject: Re: An I/O error occurred while sending to the backend (PG 13.4)
Next
From: Mark Saward
Date:
Subject: Slow plan choice with prepared query