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

chore (postgres): Make nwaku to reconnect to the Postgres database if it restarts #1893

Closed
Tracked by #1888
Ivansete-status opened this issue Aug 8, 2023 · 1 comment · Fixed by #1997
Closed
Tracked by #1888
Assignees
Labels
E:PostgreSQL See https://github.com/waku-org/pm/issues/84 for details

Comments

@Ivansete-status
Copy link
Collaborator

Background

Postgres is one of the data sources used when a nwaku node has the store protocol mounted. The connection between nwaku & postgres should be established if both processes are running.

Details

During manual testing, I realized that if the Postgres database is restarted manually, then the nwaku doesn't try to establish a connection again. Therefore, nwaku should retry to connect in case the connection is interrupted.

Acceptance criteria

The nwaku can properly establish a connection if the Postgres database is restarted many times and no leak happens after thousand of Postgres restarts.

@Ivansete-status Ivansete-status mentioned this issue Aug 7, 2023
8 tasks
@vpavlin
Copy link
Member

vpavlin commented Sep 4, 2023

This has other implications - what if nwaku tries to reconnect, but it can?

I can see 2 outcomes - it either "unmounts" store protocol (as it is unusable at that point), but that is kinds counter intuitive for the operator as the node seems completely healthy, it "just" degraded it's services

Or we "kill" the node if it cannot reconnect - then it is obvious for the operator that there is something to fix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
E:PostgreSQL See https://github.com/waku-org/pm/issues/84 for details
Projects
Archived in project
3 participants