-
Notifications
You must be signed in to change notification settings - Fork 29
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
Bug: Fails to run on first start: dependency failed to start: container test-graphql-1 is unhealthy #753
Comments
You shouldn't need those variables. Could you check the logs for postgres? |
These are the logs for postgres
and these are the logs for graphql:
looking at docker ps it looks like graphql restarts a few times. But the first time it always shows:
So that means that the migrations/metadata don't get applied unless I run it the second time. |
It is restarted twice to refresh the metadata (this is needed in case you have a remote schema running in a function), so this is expected. I don't understand your postgres logs, are these from various runs? I see this:
which I don't think it's expected. And the whole thing doesn't make sense either, the compose file is configured to have graphql wait until postgres is up and running. |
This is from a single run. My reading of those logs is that Postgres starts up and graphql thinks it's ready then Postgres shuts down, looks like it might have trouble reading files? Then graphql starts pinging it but it's already shut down, then Postgres starts up again and by the time it's ready again graphql failed all the retries. |
Looks like the restarts are by design. Here's some discussion: docker-library/postgres#146 |
Sorry, I was off last week. I think the first step is to reproduce this issue because we can't and we haven't heard of any other reports. Do you have anything specific that could be triggering this? Can you reproduce on a new project? |
Yes always happens to me on a clean project. The only thing that I believe could be unique to my setup is that I'm running it within a VM. Not sure if that would have any affect. |
Technically, almost everybody runs this in a VM as neither windows nor Mac supports docker natively. Is there anything specific in your VM that could be interfering, i.e., SELinux? In any case, this is how the logs look like in a clean project;
The most notable difference from your logs is the timestamps. In your logs the timestamps don't make any sense, specially if you say they are from a single run. In my lgs you can see postgres barely takes 10s to start and become healthy but in yours things seem to span hours and there are lots of errors about missing files. |
I just tried on the latest version |
Glad to hear :) |
Creating a clean project fails with an error the first time.
Though if I respond
n
to stop the development environment and then try again it works.Here's the relevant logs
One thought is maybe HASURA_GRAPHQL_PG_TIMEOUT or HASURA_GRAPHQL_NO_OF_RETRIES needs to be increased but I'm not sure if it's possible to set those that in the nhost.toml is it?
nhost version v1.5.2
Docker Compose version v2.20.2
Docker version 24.0.5, build v24.0.5
Tested on ubuntu and nixos
The text was updated successfully, but these errors were encountered: