I am currently testing again and collecting logs.
I have just checked the database activity and noticed candlepin is stuck idle in transaction.
postgres=# select * from pg_stat_activity where state <> 'idle';
datid | datname | pid | leader_pid | usesysid | usename | application_name | client_addr | client_hostname | client_port | backend_start | xact_start | query_start | state_change
| wait_event_type | wait_event | state | backend_xid | backend_xmin | query | backend_type
-------+-----------+-------+------------+----------+-----------+------------------------+-------------+-----------------+-------------+-------------------------------+-------------------------------+-------------------------------+------------------------
-------+-----------------+------------+---------------------+-------------+--------------+-----------------------------------------------------------------+----------------
16401 | candlepin | 24517 | | 16384 | candlepin | PostgreSQL JDBC Driver | 127.0.0.1 | | 35824 | 2024-07-28 16:35:25.806063+02 | 2024-07-28 16:35:25.978385+02 | 2024-07-28 16:35:25.985594+02 | 2024-07-28 16:35:25.986
474+02 | Client | ClientRead | idle in transaction | | 550265702 | select setting from pg_settings where name = 'edb_redwood_date' | client backend
19028 | postgres | 26870 | | 10 | postgres | psql | | | -1 | 2024-07-28 16:44:10.56482+02 | 2024-07-28 16:46:57.800293+02 | 2024-07-28 16:46:57.800293+02 | 2024-07-28 16:46:57.800
295+02 | | | active | | 550283473 | select * from pg_stat_activity where state <> 'idle'; | client backend
(2 rows)