Skip to main content

spawn_pool_maintenance

Function spawn_pool_maintenance 

Source
pub fn spawn_pool_maintenance(pool: PgPool)
Expand description

Spawn a background task that periodically maintains pool health.

Runs every idle_timeout / 2 (min 5s): evicts stale idle connections and backfills to min_connections. Call once after PgPool::connect.