Skip to content

trying to set some connection help in exograph#36

Merged
scoop1120 merged 3 commits into
mainfrom
connection-fixes
Feb 13, 2026
Merged

trying to set some connection help in exograph#36
scoop1120 merged 3 commits into
mainfrom
connection-fixes

Conversation

@scoop1120
Copy link
Copy Markdown
Contributor

This pull request introduces enhanced configurability and observability to the database connection pooling system, with a focus on making pool timeouts and lifetimes configurable via environment variables and code. It also adds the ability to query the pool's status, and improves compatibility with serverless databases by supporting custom connection recycling and lifetime policies. The changes are backward compatible, preserving legacy interfaces while enabling more advanced configuration.

Database Pool Configuration and Observability

  • Introduced a new PoolConfig struct in database_pool.rs to allow fine-grained configuration of pool size, wait timeout, create timeout, recycle timeout, and max connection lifetime. These can be set via environment variables or directly in code. (libs/exo-sql/src/sql/connect/database_pool.rs, crates/common/src/env_const.rs) [1] [2]
  • Added a PoolStatus struct and a pool_status() method to DatabaseClientManager to allow querying the current state of the connection pool (max size, current size, available, waiting). (libs/exo-sql/src/sql/connect/database_pool.rs, libs/exo-sql/src/sql/connect/database_client_manager.rs) [1] [2]

Pool Creation and Configuration Propagation

  • Refactored pool creation logic so that all relevant pool configuration options are passed through from the environment or code, both in the application (database_helper.rs) and in the SQL library. This includes new methods like from_url_with_pool_config and create_with_config, while preserving legacy methods for backward compatibility. (crates/postgres-subsystem/postgres-core-resolver/src/database_helper.rs, libs/exo-sql/src/sql/connect/database_client_manager.rs, libs/exo-sql/src/sql/connect/database_pool.rs) [1] [2] [3]

Timeouts, Recycling, and Logging

  • Pool builder now applies timeouts (wait, create, recycle) and a maximum connection lifetime, using sensible defaults for serverless DB compatibility. A pre-recycle hook rejects connections that exceed the configured max lifetime. Pool configuration is logged at startup for easier debugging. (libs/exo-sql/src/sql/connect/database_pool.rs)

Dependency and Version Updates

  • Updated the deadpool-postgres dependency to explicitly enable the rt_tokio_1 runtime feature for compatibility, and bumped the workspace version to 0.30.1. (Cargo.toml) [1] [2]

Public API Extensions

  • Re-exported PoolConfig and PoolStatus from the crate root for external use, making it easier for other parts of the system or downstream users to configure and monitor the pool. (libs/exo-sql/src/lib.rs)

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Feb 13, 2026

Version bump detected: 0.30.00.30.1

@scoop1120 scoop1120 merged commit 91b49b5 into main Feb 13, 2026
7 checks passed
@scoop1120 scoop1120 deleted the connection-fixes branch February 13, 2026 22:02
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