You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We just migrated from pg 15 on Heroku to CrunchyData CrunchyBridge and started seeing lots of "WARNING: you don't own a lock of type ExclusiveLock"
per bensheldon/good_job#388 "The warning is output by the database adapter. It means that the current database connection (thread) is trying to unlock an Advisory Lock that does not exist."
Turning off all calls to with_advisory_lock (via feature flag) made the warnings go away and restored healthy behavior.
I've talked to CrunchyData CrunchyBridge and we've compared the database sessions and can't figure out why they are behaving differently. Perhaps idle_session_timeout=0 and they are culled faster on CrunchyData CrunchyBridge? In any case, we've had to disable this gem for now and thought it worth sharing for the community.
The text was updated successfully, but these errors were encountered:
Thanks for following up.
I forgot I had opened this.
The error ended up us being on pgbouncer in transaction mode (unintentionally)
To properly use pgbouncer, we need a direct connection for migrations and for advisory locks.
In a multi database system, that means adding a special connection pool for direct connections and configure a special connection class to use it
And then only use that for advisory locks
We just migrated from pg 15 on Heroku to CrunchyData CrunchyBridge and started seeing lots of "WARNING: you don't own a lock of type ExclusiveLock"
per bensheldon/good_job#388 "The warning is output by the database adapter. It means that the current database connection (thread) is trying to unlock an Advisory Lock that does not exist."
Turning off all calls to with_advisory_lock (via feature flag) made the warnings go away and restored healthy behavior.
I've talked to CrunchyData CrunchyBridge and we've compared the database sessions and can't figure out why they are behaving differently. Perhaps idle_session_timeout=0 and they are culled faster on CrunchyData CrunchyBridge? In any case, we've had to disable this gem for now and thought it worth sharing for the community.
The text was updated successfully, but these errors were encountered: