© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
SupabaseS
Supabase•5mo ago
jsingleton37

Too many clients already, Supabase + Drizzle

An engineer helping me on an OSS project is running into
[Error [PostgresError]: remaining connection slots are reserved for non-replication superuser connections]
[Error [PostgresError]: remaining connection slots are reserved for non-replication superuser connections]


With
[cause]: [Error[PostgresError]: sorry, too many clients already]
[cause]: [Error[PostgresError]: sorry, too many clients already]


This is locally connected to docker. Our drizzle setup looks like this

import { drizzle } from 'drizzle-orm/postgres-js'
import postgres from 'postgres'

import * as schema from './schema'
import { env } from '@/app/env'

const connectionString = env.POSTGRES_URL
const client = postgres(connectionString, { prepare: false })

// Use this object to send drizzle queries to your DB
export const db = drizzle(client, { schema })
import { drizzle } from 'drizzle-orm/postgres-js'
import postgres from 'postgres'

import * as schema from './schema'
import { env } from '@/app/env'

const connectionString = env.POSTGRES_URL
const client = postgres(connectionString, { prepare: false })

// Use this object to send drizzle queries to your DB
export const db = drizzle(client, { schema })
Supabase banner
SupabaseJoin
Supabase gives you the tools, documentation, and community that makes managing databases, authentication, and backend infrastructure a lot less overwhelming.
45,816Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Postgres - Sorry, too many clients
SupabaseSSupabase / help-and-questions
4y ago
supabase_storage_admin too many connections
SupabaseSSupabase / help-and-questions
3y ago
Supabase error: { message: "Error: Too many subrequests.", details: "Error: Too many subrequests.
SupabaseSSupabase / help-and-questions
13mo ago
Problems with authentication on Supabase – 429 Too Many Requests
SupabaseSSupabase / help-and-questions
7mo ago