I’m finishing development of a feature branch and trying to deploy the preview. This is something I have done many times before, without issues.
Suddently, my preview deployments are now unable to connect to the database, causing all requests to fail with the following error:
Error: All attempts to open a WebSocket to connect to the database failed. Please refer to https://github.com/neondatabase/serverless/blob/main/CONFIG.md#websocketconstructor-typeof-websocket--undefined. Details: fetch failed
I have tried to create a mock pull request that is identical to my main branch (which is currently deployed and working as expected), but this new deployment has the same error, causing me to suspect that some bug has been introduced by Vercel.
I also just tried promoting the mock pull request to production, just to verify that this was not related to preview environment variables, but the issue still persists.
Turns out my database had been automatically migrated from a vercel database to a Neon database without my knowledge, which explains the change in behaviour. The fact that this can break deployements is a bit worrying, and also the fact that I was not notified annoys me a bit.
I changed my dependencies from @vercel/postgres-kysely to use kysely-neon. This seems to work.
Hey Frederik! Thanks for your reply and I am glad to hear that you were able to identify the issue. We have not received any reports from existing SDK users who are already using @vercel/postgres about workflow disruptions. Although I am not sure confident about postgres-kysely package. However, You likely received an email directly from our Vercel Marketplace team on this communication as well:
Subject: No Action Required: Vercel Postgres transition to Neon-managed service on Vercel Marketplace
We’re making updates to improve your experience with Vercel Postgres.
As part of this transition, your Vercel Postgres databases will now be
managed by Neon in the Vercel Marketplace. This migration will happen
automatically with no downtime and no action required on your
part. Here’s what to expect:
What’s Staying the Same
Pricing: Your pricing will remain the same, with no increase to the rates you are currently paying.
Data collection: All data currently processed and disclosed between Vercel and Neon will stay the same. No new data will be
collected or processed.
No Downtime: Your service will continue without interruption.
What’s changing
Billing ~~transition:~~ You will continue to be billed at the same rate, but you will receive a new invoice from Vercel Marketplace
on behalf of Neon, separate from your standard Vercel invoice.
Support: Your database will remain accessible through the Vercel Dashboard, with extended access available on Neon’s platform.
Neon will be responsible for providing direct support moving forward.
Extended capabilities: You will now have full, integrated access to all of Neon’s latest features and updates.
If you have any questions or concerns regarding this migration, please
contact our support team.
Thank you for trusting us as we continue to improve your experience!