1
Allow configuring PostgREST pool and pooler in Supabase CLI (api.db_pool, api.use_pooler)
Source: supabase/supabase#41709 · opened by @3h4x
Problem: In local development with Supabase CLI, the PostgREST container is hardcoded to use a max pool size of 10 (PGRST_DB_POOL=10). Under integration test load, this saturates the pool and results in intermittent 502s (e.g., “Connection reset by peer” / “Invalid response from upstream”). There is currently no supported way to increase the PostgREST connection pool or route PostgREST through the built-in pooler (Supavisor) via config.toml. Current behavior: PostgREST connects directly to Postgres (docker internal host/port). Pool size is fixed at 10 (logs show “Connection Pool initialized with a maximum size of 10 connections”). db.pooler settings in config.toml don’t affect PostgREST because it bypasses the pooler. Setting PGRST_DB_POOL in .env doesn’t propagate to the CLI-managed API container. What I tried Enabled [db.pooler] with default_pool_size = 20 — no effect on PostgREST. Set PGRST_DB_POOL=50 in .env — not passed through to container. Changed external ports …
No pledges yet. Be the first to back this.
Comments
Similar requests
Feature Request: Expose Database Pooler Connection Details via Environment Variable
2 votes · 0 comments
Custom query parameter on postgrest-js
4 votes · 0 comments
Introducing supabase to the Haskell ecosystem
9 votes · 0 comments
Cache layer on top of Postgres
5 votes · 0 comments
1-Click PgBouncer Installation - Connection Pooler for PostgreSQL
1 vote · 0 comments
No comments yet.