Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(db-postgres): too many clients already, cannot read properties 'transaction' of undefined #6338

Merged
merged 1 commit into from
May 13, 2024

Conversation

jmikrut
Copy link
Member

@jmikrut jmikrut commented May 13, 2024

Description

This PR aims to solve a few misc. issues related to Postgres and HMR.

First, we may have been creating a new connection each time HMR fired. We now re-use existing connections so that connection pools aren't exhausted.

Second, we now track Drizzle initialization across multiple invocations, so that if HMR is triggered, but there was already an operation in flight, Payload will wait for initialization before beginning a new transaction.

@jmikrut jmikrut merged commit 47cd5f4 into beta May 13, 2024
34 checks passed
@jmikrut jmikrut deleted the fix/postgres-hmr branch May 13, 2024 16:13
JessChowdhury pushed a commit that referenced this pull request May 14, 2024
JessChowdhury pushed a commit that referenced this pull request May 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant