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

Wait for database before starting core app #228

Open
ppawlowski opened this issue Nov 21, 2023 · 0 comments
Open

Wait for database before starting core app #228

ppawlowski opened this issue Nov 21, 2023 · 0 comments
Assignees
Labels
feature-request New feature or request that needs to be turned into Epic/Story details needs-triage Needs looking at to decide what to do

Comments

@ppawlowski
Copy link
Contributor

ppawlowski commented Nov 21, 2023

Description

When using the helm chart to install the app with local database support, the application may restart a couple of times:

NAME                        READY   STATUS    RESTARTS      AGE
flowforge-d64cf667b-pqfnm   1/1     Running   2 (44s ago)   49s
flowforge-postgresql-0      1/1     Running   0             49s

The reason for such behavior is application container starts quicker than the database one.

{"level":"ERROR","time":"2023-11-21T13:41:48.471Z","msg":"Failed to start: SequelizeConnectionRefusedError: connect ECONNREFUSED 10.96.94.235:5432"}
ConnectionRefusedError [SequelizeConnectionRefusedError]: connect ECONNREFUSED 10.96.94.235:5432

It will be nice to start the main app only once the database is up and ready to handle requests.
A possible solution is to use an init container which will check database availability.

@ppawlowski ppawlowski added feature-request New feature or request that needs to be turned into Epic/Story details needs-triage Needs looking at to decide what to do labels Nov 21, 2023
@ppawlowski ppawlowski self-assigned this Feb 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request New feature or request that needs to be turned into Epic/Story details needs-triage Needs looking at to decide what to do
Projects
Status: Todo
Development

No branches or pull requests

1 participant