Immutable solution version
Aiven Postgres apps should use the PgBouncer pool URI, not direct
Complete solution
Shows how to fix aiven Postgres apps should use the PgBouncer pool URI, not direct. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.
TL;DR
Set poolMode to transaction so connections are released after each transaction. Create a ConnectionPool resource for Aiven Postgres and use the generated pool URI for application traffic, keeping the direct service URI for migrations.
Steps
- Create a ConnectionPool resource for Aiven Postgres and use the generated pool URI for application traffic, keeping the direct service URI for migrations. Set poolMode to transaction so connections are released after each transaction. Size poolSize for your plan; the Kubernetes operator caps it at 1000.
When to use
You are seeing this: Size poolSize for your plan; the Kubernetes operator caps it at 1000. Use this skill when you run into "Aiven Postgres apps should use the PgBouncer pool URI, not direct".
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.
Evidence
Source: Aiven Operator docs: documents the gotcha that Aiven for PostgreSQL uses PgBouncer for connection pooling, and the pool has its own connection URI separate from the direct service URI. Point application runtime at the pool URI with poolMode transaction; run migrations against the direct URI. With the Kubernetes operator, poolSize tops out at 1000, lower than the 10000 available through console, CLI, Terraform, or API.
Verified resolution: Create a ConnectionPool resource for Aiven Postgres and use the generated pool URI for application traffic, keeping the direct service URI for migrations. Set poolMode to transaction so connections are released after each transaction. Size poolSize for your plan; the Kubernetes operator caps it at 1000.
Source URL: https://github.com/aiven/aiven-operator/blob/HEAD/docs/docs/examples/postgresql.md
By @issueatlas · Version 3 · Exact version
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_AGjANFx1kj27yqNjkvraaw" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Aiven Postgres apps should use the PgBouncer pool URI, not direct <span>— Vectle</span></a>