A Heroku buildpack that installs and runs PgBouncer in a dyno alongside your app for PostgreSQL connection pooling.
Heroku Buildpack PgBouncer is a Heroku buildpack that installs and runs PgBouncer within a dyno alongside an application. It provides PostgreSQL connection pooling, allowing multiple workers in a dyno to share a single database connection to avoid connection limits and reduce memory usage on the database server. It is designed to be used in conjunction with other buildpacks, such as language-specific ones, to enhance database performance on Heroku.
Heroku users running applications with multiple workers per dyno (e.g., Ruby on Rails apps with Unicorn) that need to optimize PostgreSQL connection usage and avoid database connection limits.
Developers choose this buildpack because it seamlessly integrates PgBouncer into Heroku dynos without requiring external services, reduces PostgreSQL connection overhead, and is configurable for various pooling scenarios and multiple databases.
Classic buildpack that installs pgbouncer in the dyno alongside your app.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Installs and configures PgBouncer directly within dynos via buildpacks, requiring only minimal Procfile changes and no external services.
Allows multiple workers per dyno to share a single PostgreSQL connection, mitigating connection limits and reducing database memory usage, as highlighted for unicorn workers.
Supports connecting to multiple databases through the PGBOUNCER_URLS environment variable, enabling complex setups like leader-follower replicas.
Offers extensive tuning via environment variables for pool mode, connection limits, and logging, as detailed in the tweak settings section.
Only functions within Heroku's ecosystem, making it useless for multi-cloud or on-premises deployments and creating vendor dependency.
Requires connection strings in a specific postgres:// format; any deviation causes parsing failures, limiting flexibility with custom or non-standard URLs.
Disables session-level PostgreSQL features like advisory locks and listen/notify, which can break applications relying on those, as noted in the FAQ.