> ## Documentation Index
> Fetch the complete documentation index at: https://loadwise.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# db-pool-client-not-released

> A locally checked-out database connection can leave its scope without being released.

## What it flags

A local checkout through `pg.Pool.connect()` or the mysql2 promise API's `pool.getConnection()` that can leave without returning its connection to the pool.

## How to review or fix

Keep work that uses the connection inside a `try` block and release it in `finally`. If a separate owner needs the connection, make the ownership transfer explicit and ensure that owner releases it. A pool query manages its own checkout.

## Configuration

Set the rule to `"off"` in `loadwise.config.json` to drop its findings:

```json theme={null}
{
  "rules": { "db-pool-client-not-released": "off" }
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.