Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reload connection pool when connection with Postgres is lost #5

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

cryptobioz
Copy link

As the connection pool is created during the initialization, when the connection to the PostgreSQL server is lost, Addok is not able to setup a new connection pool. Thus, you must restart Addok to get your service back.

This PR intends to fix this behavior by checking if the connection is lost every time you request a connection from the pool. If it's the case, it will create a new pool and pick a connection from it.

@cryptobioz cryptobioz force-pushed the reload-pool-connection-lost branch 2 times, most recently from 3c2874b to 5a82265 Compare February 4, 2020 08:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants