Skip to content

Conversation

@KarthikeyaKollu
Copy link

Description

This PR resolves the issue of a missing pool_config module in the SQLAlchemyDatabaseManager implementation (memori/database/sqlalchemy_manager.py). The absence of this module caused an ImportError.

To address the issue, I added a new pool_config.py file to centralize the default database connection pool settings. The following configurations have been introduced:

  • DEFAULT_POOL_SIZE = 5: Sets the maximum size of the connection pool for regular database connections.
  • DEFAULT_MAX_OVERFLOW = 10: Defines the maximum number of connections that can exceed the pool size during high-demand periods.
  • DEFAULT_POOL_TIMEOUT = 30: Specifies the time (in seconds) the application waits for a database connection before throwing a timeout error.
  • DEFAULT_POOL_RECYCLE = 3600: Ensures that connections are refreshed/recycled after 1 hour to prevent stale or idle connections.
  • DEFAULT_POOL_PRE_PING = True: Enables pre-ping checks to validate connection health before use.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant