heroku / heroku-buildpack-pgbouncer

Run pgbouncer in a dyno along with your application
MIT License
338 stars 136 forks source link

PGBOUNCER_CONNECTION_RETRY doesn't seem to work #145

Open abbasalizaidi opened 3 years ago

abbasalizaidi commented 3 years ago

Hello,

We have been using a fork from this repo with minimal customization. Seems like the variable PGBOUNCER_CONNECTION_RETRY is not honored. Can you help whats wrong here?

Abbas

mble commented 3 years ago

@abbasalizaidi That was for the stunnel retry configuration, which is no longer included in this buildpack and is therefore a no-op.

What are you trying to accomplish with this configuration variable?

abbasalizaidi commented 3 years ago

@mble We are trying to test the failover of the database running in AWS with application in Heroku but the app doesn't seem to reconnect post failover unless it is restarted.

mble commented 3 years ago

@abbasalizaidi Understood. On Heroku, when we perform a failover of a Heroku Postgres service, we will restart the app to force reconnection.

PgBouncer itself doesn't have any failover detection logic, so how to handle this will depend on how you are performing the failover in AWS (https://www.pgbouncer.org/faq.html#how-to-failover).