Skip to content

Reconnect automatically #2

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

Open
FedericoCeratto opened this issue Mar 22, 2020 · 4 comments
Open

Reconnect automatically #2

FedericoCeratto opened this issue Mar 22, 2020 · 4 comments

Comments

@FedericoCeratto
Copy link

FedericoCeratto commented Mar 22, 2020

Thanks for developing pg.
The current implementation does not handle reconnecting to the database in case of timed out or broken connections. Any workaround?

Also see nim-lang/db_connector#9

@treeform
Copy link
Owner

treeform commented Feb 8, 2022

I have this lib running in production for 2 years now. I never had connections time out between servers in the same data center. I guess its a very rare event?

@treeform
Copy link
Owner

treeform commented Feb 8, 2022

Maybe db_postgres does auto reconnect?

@FedericoCeratto
Copy link
Author

@treeform it really depend on the reliability of the network and if the server is restarted. Yet, detecting stale connections and reconnecting is usually a basic requirement for database libraries.

@hasanyasin
Copy link

Disconnects can also be caused by the server dropping older clients.

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

No branches or pull requests

3 participants