Skip to content

SQL registry disconnections #3611

@jiewpeng

Description

@jiewpeng

Expected Behavior

SQL registry works.

Current Behavior

When a SQL registry is used, there is a chance that we may hit a psycopg2.OperationalError: SSL connection has been closed unexpectedly issue. This can happen due to the connection being closed for being idle for too long.

Steps to reproduce

Use a SQL registry and set a connection idle timeout at the DB. Create a feature store object to connect to this registry, and wait for the timeout (i.e. don't query the feature store). Then try to query the feature store.

Specifications

  • Version: 0.25.0 (but should not matter)
  • Platform: Linux

Possible Solution

When creating the SQL registry, use self.engine = create_engine(..., pool_pre_ping=True). See https://docs.sqlalchemy.org/en/14/core/pooling.html#pool-disconnects

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions