# Patroni problems - replicas rejecting connection

**URL:** <https://forums.percona.com/t/patroni-problems-replicas-rejecting-connection/23025>\
**Category:** PostgreSQL\
**Created:** [June 22, 2023, 7:58am UTC](https://forums.percona.com/t/patroni-problems-replicas-rejecting-connection/23025 "2023-06-22T07:58:27Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Slavisa\_Milojkovic](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/slavisa_milojkovic/32/7097_2.png) [@Slavisa\_Milojkovic](https://forums.percona.com/u/Slavisa_Milojkovic)\
**Post date:** [June 22, 2023, 7:58am UTC](https://forums.percona.com/t/patroni-problems-replicas-rejecting-connection/23025/1 "2023-06-22T07:58:27Z")

</div>

Hello can someone help me recover a pg-db cluster, replica pods are constantly restarting saying postgres is not running. I’m attaching the full log

```auto
During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/patroni/api.py", line 595, in get_postgresql_status
    row = self.query(stmt.format(postgresql.wal_name, postgresql.lsn_name), retry=retry)[0]
  File "/usr/lib/python3.6/site-packages/patroni/api.py", line 577, in query
    return self.server.query(sql, *params)
  File "/usr/lib/python3.6/site-packages/patroni/api.py", line 663, in query
    raise PostgresConnectionException('connection problems')
patroni.exceptions.PostgresConnectionException: 'connection problems'
2023-06-22 07:53:39,304 WARNING: Postgresql is not running.

```

[pg-db-repl1-7fbc985b57-2djzj.log](https://forums.percona.com/uploads/short-url/sM2AHb9EU069NcXvl42dwLzP8GH.log) (41.8 KB)

---

<div class="post-metadata">

**Author:** ![Slavisa\_Milojkovic](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/slavisa_milojkovic/32/7097_2.png) [@Slavisa\_Milojkovic](https://forums.percona.com/u/Slavisa_Milojkovic)\
**Post date:** [June 22, 2023, 9:06am UTC](https://forums.percona.com/t/patroni-problems-replicas-rejecting-connection/23025/2 "2023-06-22T09:06:45Z")

</div>

> [@Slavisa\_Milojkovic](#):
>
> `patroni.exceptions.PostgresConnectionException: 'connection problems'`

The problem was with the default mem values limit of 128Mb, you should change those for replicas.
