Skip to content

On slow systems Postgres is not ready before Spring requires it #8

@robert-bor

Description

@robert-bor

When the project is run on a slow system, the following happens. Docker Postgres states it is ready, resulting in the Docker lock being released, allowing Spring Boot to resume operations. However, as soon as Liquibase wants to acquire a datasource, it fails:

Caused by: org.postgresql.util.PSQLException: FATAL: the database system is starting up

The situation does not occur in the following situations:

  • when the system has just started up (theory; the first JVM run is slow, making it slower than Postgres on Docker, therefore not resulting in the aforementioned error)
  • when a breakpoint is set before Liquibase creates a datasource.

Ideally, the system would be able to reliably verify if the database is available. Perhaps a check on the port?

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions