Skip to content

Intermittent Connection Error in CI: Expected password response, got message type 88 #86

@pyramation

Description

@pyramation

I've observed a rare and intermittent error during CI runs on GitHub Actions:

Expected password response, got message type 88

This appears to occur when the test suite or app attempts to connect to PostgreSQL before it's fully ready to accept connections, causing the client to send a termination ('X') message instead of a proper authentication response.

It does not happen consistently, only sporadically — likely due to timing/race conditions during service startup in the CI environment.

Probable Cause:

  • PostgreSQL service is still initializing when the connection is attempted.
  • The client receives an incomplete or unexpected response and closes the connection, triggering the error.

Suggested Fix:

  • Add a retry or readiness check using pg_isready or a custom wait loop before running tests or migrations.
  • Optionally configure a healthcheck for PostgreSQL in docker-compose.yml and wait for it to report healthy status before continuing.

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