BUG #17776: Connections are terminated unexpectedly sometimes - Mailing list pgsql-bugs

From PG Bug reporting form
Subject BUG #17776: Connections are terminated unexpectedly sometimes
Date
Msg-id 17776-36d858c9afa20043@postgresql.org
Whole thread Raw
Responses Re: BUG #17776: Connections are terminated unexpectedly sometimes
List pgsql-bugs
The following bug has been logged on the website:

Bug reference:      17776
Logged by:          Francesco Tagliani
Email address:      fran.tm213@gmail.com
PostgreSQL version: 14.6
Operating system:   Ubuntu 20
Description:

I am running Ruby on Rails app with postgresql 14.6 on ubuntu 20.
For some reason, the connections are terminated unexpectedly while running a
background job.
Regarding background job, it requires around 100~200 connections over
6~7hrs.

I've installed pghero and configured postgresql based on
pgtune(https://pgtune.leopard.in.ua/)
This is current configuration

# DB Version: 14
# OS Type: linux
# DB Type: web
# Total Memory (RAM): 48 GB
# CPUs num: 12
# Connections num: 1000
# Data Storage: hdd

max_connections = 1000
shared_buffers = 12GB
effective_cache_size = 36GB
maintenance_work_mem = 2GB
checkpoint_completion_target = 0.9
wal_buffers = 16MB
default_statistics_target = 100
random_page_cost = 4
effective_io_concurrency = 2
work_mem = 3145kB
min_wal_size = 1GB
max_wal_size = 4GB
max_worker_processes = 12
max_parallel_workers_per_gather = 4
max_parallel_workers = 12
max_parallel_maintenance_workers = 4

I've checked postgresql log around that time.

2023-02-06 06:45:41.702 UTC [341438] user@db_production LOG:  could not
receive data from client: Connection reset by peer
2023-02-06 08:26:56.134 UTC [352190] user@db_production LOG:  could not
receive data from client: Connection reset by peer
2023-02-06 08:26:56.134 UTC [352191] user@db_production LOG:  could not
receive data from client: Connection reset by peer

And I can not find other logs.
Can you please advise me how to debug this issue or fix this issue?

Thanks


pgsql-bugs by date:

Previous
From: hubert depesz lubaczewski
Date:
Subject: Re: WAL segments removed from primary despite the fact that logical replication slot needs it.
Next
From: Masahiko Sawada
Date:
Subject: Re: WAL segments removed from primary despite the fact that logical replication slot needs it.