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

GraphQL ToDo App should have non-default DB initialization timeout #1287

Open
eeverman opened this issue May 29, 2023 · 4 comments · May be fixed by #1288
Open

GraphQL ToDo App should have non-default DB initialization timeout #1287

eeverman opened this issue May 29, 2023 · 4 comments · May be fixed by #1288

Comments

@eeverman
Copy link

The DB configuration for the micronaut-graphql-todo app has no initialization-fail-timeout set. The default for that is 1ms, so if your machine happens to be a bit busy or slow, the app fails to start with a DB connection error. Adding initialization-fail-timeout: 20000 (20 seconds) would fix this for all but the slowest machines.

So that section would look like this:

#tag::datasource[]
datasources:
  default:
    driverClassName: org.postgresql.Driver  # <2>
    dialect: POSTGRES # <3>
    schema-generate: NONE # <4>
    initialization-fail-timeout: 20000
#end::datasource[]
@eeverman eeverman linked a pull request May 29, 2023 that will close this issue
@eeverman
Copy link
Author

Note: I created a MR for this one project, but probably all the sample projects w/ a DB connection should have similar configuration.

@sdelamo
Copy link
Contributor

sdelamo commented Jun 7, 2023

I don't know if the place to change this is in the tutorials. If the default is too aggressive, I think we should change the default.

@sdelamo
Copy link
Contributor

sdelamo commented Jun 7, 2023

thoughts @dstepanov ?

@dstepanov
Copy link

Do we use test resources? The test container should wait till the database is ready

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 a pull request may close this issue.

3 participants