mix phoenix_kit.doctor (phoenix_kit v1.7.71)

Copy Markdown View Source

Diagnoses PhoenixKit installation, migration, and runtime issues.

Runs a comprehensive suite of checks covering database connectivity, pool configuration, PgBouncer detection, migration state, lock conflicts, and application configuration. Prints a clear pass/fail report with actionable remediation steps.

Usage

$ mix phoenix_kit.doctor
$ mix phoenix_kit.doctor --prefix=auth

Options

  • --prefix - Database schema prefix (default: "public")

Checks Performed

  1. Repo Detection — Can we find and start the Ecto repo?
  2. DB Connectivity — Can we execute a simple query?
  3. Pool Configuration — Pool size, checkout timeout, queue settings
  4. PgBouncer Detection — Is PgBouncer between app and PostgreSQL?
  5. Migration State — PhoenixKit version (COMMENT), schema_migrations alignment
  6. Pending Migrations — Migration files not yet recorded in schema_migrations
  7. UUID Column Types — Detects varchar uuid columns that crash Ecto on startup
  8. NULL UUIDs in FK Sources — Detects NULL uuids that cause infinite backfill loops
  9. Orphaned FK References — Detects orphaned rows that block FK constraint creation
  10. Lock Conflicts — Any blocked or long-running queries?
  11. Orphaned Connections — Idle-in-transaction or stuck connections
  12. Oban Configuration — Queues and plugins that consume pool connections
  13. Supervisor Children — What's running (update_mode vs full)?
  14. Update Mode — Is update_mode active?