Railway

Deploy Postgres with PgBouncer

Add PgBouncer as a connection pooler in front of Postgres

Deploy Postgres with PgBouncer

Postgres PgBouncer

Adds PgBouncer as a connection pooler in front of your Postgres database.

Connecting

Use DATABASE_URL from the PgBouncer service instead of connecting directly to Postgres.

For operations transaction pooling can't serve (migrations, LISTEN/NOTIFY, session-level SET), use DATABASE_UNPOOLED_URL (or DATABASE_PUBLIC_UNPOOLED_URL over the public network) — they point straight at the database.

Configuration

VariableDefaultDescription
POOL_MODEtransactionsession, transaction, or statement
MAX_CLIENT_CONN1000Max total client connections
DEFAULT_POOL_SIZE20Server connections per db/user pair

Template Content

More templates in this category

View Template
Garage S3 Storage
Ultra-light S3 server: fast, open-source, plug-and-play 🚀

PROJETOS
View Template
Postgres Backup to Cloudflare R2 (S3-Compatible)
Automated PostgreSQL backups to S3-compatible storage with encryption

Artour
View Template
ReadySet
A lightweight caching engine for Postgres

Milo