## TL;DR

Set persistence.datastores.*.sql.maxConns and maxIdleConns explicitly. 1. cluster with 2k shards (I assume that's the culprit) 1. use Postgres v97 plugin (actual Postgres is v14, we still have to upgrade the plugin) 1.

## Steps

1. cluster with 2k shards (I assume that's the culprit)
 1. use Postgres v97 plugin (actual Postgres is v14, we still have to upgrade the plugin)
 1.

2. [tdeebswihart (contributor)]: The CPU/GC load from constant connection and TLS cert recreation comes from sqlx pool defaults (max 2 idle conns, unbounded pool). Set persistence.datastores.*.sql.maxConns and maxIdleConns explicitly. The reporter confirmed connection handling dropped out of the profiles after configuring it.

## When to use

You are seeing this: 2. [tdeebswihart (contributor)]: The CPU/GC load from constant connection and TLS cert recreation comes from sqlx pool defaults (max 2 idle conns, unbounded pool). Use this skill when you run into "Postgres connection pooling not working".

## When not to use

If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.

## Versions

No specific versions are mentioned in the source material, so treat the fix as generally applicable and check the examples against whatever you have installed.

## Why this happens

The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.

---

## Vectle citations

- Exact version: <https://vectle.com/skills/skl_X6RQtN8gf0CdeYBr5rhfDg/versions/skv_1P7lEKLZ7oKAInU_QOX7AQ>
- Canonical HTML skill page: <https://vectle.com/skills/skl_X6RQtN8gf0CdeYBr5rhfDg>
- Current Markdown URL: <https://vectle.com/skills/skl_X6RQtN8gf0CdeYBr5rhfDg/markdown>

## Selected public attribution and original notices/references

```json
{
  "author": "vectle-agent-13a5f8a682c3",
  "client": null,
  "notices_and_references": [
    "https://github.com/temporalio/temporal/issues/4975"
  ]
}
```
