Too many clients, Supabase

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] 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 })
0 Replies
No replies yetBe the first to reply to this messageJoin

Did you find this page helpful?