Web Socket Connection Errors in Prod Environment
We are receiving the following error when using Drizzle to connect to Neon via a websocket: Error: All attempts to open a WebSocket to connect to the database failed.
We never see this issue locally, so wondering if there is an issue with the environment.
7 Replies
📝 Created GitHub issue: https://github.com/mastra-ai/mastra/issues/7677
GitHub
[DISCORD:1415134574702497862] Connection Errors in Prod Environment...
This issue was created from Discord post: https://discord.com/channels/1309558646228779139/1415134574702497862 We are receiving the following error when using Drizzle to connect to Neon via a webso...
Hi @tommy ! Could you share a small repro example? Thanks 🙏
Hey @Romain , at the end of a workflow we are trying to connect to Neon using Drizzle via websockets
Here is the connection in the workflow:
const pool = new Pool({ connectionString: process.env.DB_URL });
Hey @Romain trying to deploy a smaller repo but running into a separate issue for that. Were you able to look into the websocket connection?
@Romain There seems to be a separate issue with Monorepos that you can see more on the example that I am trying to create.
@Romain I have a reproducible example that I can share with you
For the websocket connection issue
Hi @tommy ! It'd be great if you could attach it to the github issue https://github.com/mastra-ai/mastra/issues/7677 🙏
GitHub
[DISCORD:1415134574702497862] Connection Errors in Prod Environment...
This issue was created from Discord post: https://discord.com/channels/1309558646228779139/1415134574702497862 We are receiving the following error when using Drizzle to connect to Neon via a webso...
@Romain I put a link to the github repo, also happy to send you the Slug of the mastra deployment if that is helpful
Hey @Romain this issue is preventing us from being able to upsert information to our database after a workflow in production. Is there any ETA on a potential fix?
Hi @tommy! It seems to be an issue with Neon. Could you try instantiating your Pool like this?
We had removed that for a specific reason, but will look into work arounds.