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
Since upgrading from Rails 7.0 to 7.1 we've started to see the following exception:
# activerecord (7.1.3.2) lib/active_record/connection_adapters/postgresql_adapter.rb in get_oid_type
undefined method `key?' for nil:NilClass (NoMethodError)
if !type_map.key?(oid)
^^^^^
I haven't been able to replicate the behavior outside of production where it occurs when the application briefly loses its connection to the postgres database while under load. This is a multi-threaded environment. The server never recovers after entering this state.
I know there was a change to type_map initialization at dc4420c, and it looks to me like it's possible there's a race condition here. I'll update this issue with steps to replicate if I can manage to trigger this outside of production.
Expected behavior
The application should recover from a brief database outage and reconnect.
Actual behavior
The server is never able to reconnect.
System configuration
Rails version: 7.1.3.2
Ruby version: 3.2.4
The text was updated successfully, but these errors were encountered:
Steps to reproduce
Since upgrading from Rails 7.0 to 7.1 we've started to see the following exception:
I haven't been able to replicate the behavior outside of production where it occurs when the application briefly loses its connection to the postgres database while under load. This is a multi-threaded environment. The server never recovers after entering this state.
I know there was a change to type_map initialization at dc4420c, and it looks to me like it's possible there's a race condition here. I'll update this issue with steps to replicate if I can manage to trigger this outside of production.
Expected behavior
The application should recover from a brief database outage and reconnect.
Actual behavior
The server is never able to reconnect.
System configuration
Rails version: 7.1.3.2
Ruby version: 3.2.4
The text was updated successfully, but these errors were encountered: