From 24745d24ec4947d520e6df5b96bb89f4dc4c4665 Mon Sep 17 00:00:00 2001 From: xrendan Date: Fri, 27 Mar 2026 16:10:22 -0600 Subject: [PATCH] Disable statement timeout in production to fix GoodJob advisory lock errors Supabase's default statement timeout (4 min) kills GoodJob's pg_advisory_xact_lock queries, causing 57014 errors. Setting statement_timeout to 0 on the Rails connection lets advisory locks wait as long as needed. Co-Authored-By: Claude Opus 4.6 (1M context) --- config/database.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/config/database.yml b/config/database.yml index ad6ec5a..086f8d1 100644 --- a/config/database.yml +++ b/config/database.yml @@ -78,6 +78,8 @@ staging: production: <<: *default url: <%= ENV["DATABASE_URL"] %> + variables: + statement_timeout: 0 # # Read https://guides.rubyonrails.org/configuring.html#configuring-a-database # for a full overview on how database connection configuration can be specified.