Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 6 additions & 1 deletion examples/allgood.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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 ---
Expand Down
Loading