Thanks to visit codestin.com
Credit goes to github.com

Skip to content

sqlalchemy setting "pool_pre_ping" #5932

@etj

Description

@etj

CKAN version

Introduced in commit ae9eb13 which is related at least to 2.9.0, 2.9.1, 2.9.2.

Describe the bug

This is the ckan code:

    # Enable pessimistic disconnect handling (added in SQLAlchemy 1.2)
    # to eliminate database errors due to stale pooled connections
    config.setdefault('pool_pre_ping', True)

    # Initialize SQLAlchemy
    engine = sqlalchemy.engine_from_config(config)

This is the sqlalchemy function:

    def engine_from_config(configuration, prefix="sqlalchemy.", **kwargs):

I guess the pool_pre_ping config is not taken into account by sqlalchemy since it's missing the prefix.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions