diff --git a/README.md b/README.md index 76909cb..7feb4df 100644 --- a/README.md +++ b/README.md @@ -80,7 +80,12 @@ check "Database can perform a simple query" do end check "Database migrations are up to date" do - make_sure ActiveRecord::Migration.check_all_pending! == nil + # Primary database only, read-only, ~ms. Deliberately NOT + # ActiveRecord::Migration.check_all_pending! — that walks EVERY configured + # connection pool (queue/cache/cable in a Solid-* app) and blocks on pool + # checkout under load, which can push a healthy page into check-timeout + # territory. Seen in production: 122ms idle, >10s under traffic. + make_sure !ActiveRecord::Base.connection.pool.migration_context.needs_migration? end check "Disk space usage is below 90%" do diff --git a/examples/allgood.rb b/examples/allgood.rb index ecca106..c7ebfc6 100644 --- a/examples/allgood.rb +++ b/examples/allgood.rb @@ -38,7 +38,12 @@ end check "Database migrations are up to date" do - make_sure ActiveRecord::Migration.check_all_pending! == nil + # Primary database only, read-only, ~ms. Deliberately NOT + # ActiveRecord::Migration.check_all_pending! — that walks EVERY configured + # connection pool (queue/cache/cable in a Solid-* app) and blocks on pool + # checkout under load, which can push a healthy page into check-timeout + # territory. Seen in production: 122ms idle, >10s under traffic. + make_sure !ActiveRecord::Base.connection.pool.migration_context.needs_migration? end # --- IMAGE PROCESSING ---