Skip to content

docker-compose postgres database creation race condition (on slower systems like WSL) #291

@jonenst

Description

@jonenst

In one deployment, we saw:

postgres: db is not ready to create databases...
postgres: db is not ready to create databases...
postgres: db is not ready to create databases...
...
..postgres becomes ready..

... postgres restarts

curl: geo-data is not ready..
curl: geo-data is not ready..
curl: geo-data is not ready..
curl: geo-data is not ready..
curl: geo-data is not ready..
curl: geo-data is not ready..

but the geo-data would never become ready because the databases were not created. And it seemed like the database would never be created because we were at the step of curling in the geo data.

The wait for postgres to be ready picked up the first time postgres was up and tried to create the databases at this time and failed because postgres was restarting

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions