You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm seeing the following crop up on my Sentry errors for my backend functions
TypeError: null is not an object (evaluating 'socket.write')
File "/node_modules/postgres/src/connection.js", line 250, col 15, in nextWrite
running postgres 3.4.5 on Bun 1.2.10 in production. Sorry this issue is so light on details, I don't have many yet, but I wanted to put this here in case others are running into the same thing and we can figure out a solution together.
This seems to happen more or less randomly with postgres running on Bun on fly.io connected to a supabase database. Looking at the code I'm not sure how socket could become null unexpectedly. It's only assigned null in closed so I wouldn't expect it to be writing to the socket if closed were already called.
I'm seeing the following crop up on my Sentry errors for my backend functions
running postgres
3.4.5
on Bun1.2.10
in production. Sorry this issue is so light on details, I don't have many yet, but I wanted to put this here in case others are running into the same thing and we can figure out a solution together.This seems to happen more or less randomly with postgres running on Bun on fly.io connected to a supabase database. Looking at the code I'm not sure how socket could become
null
unexpectedly. It's only assignednull
inclosed
so I wouldn't expect it to be writing to the socket ifclosed
were already called.postgres/src/connection.js
Lines 249 to 254 in b0d8c8f
I suspect maybe a bug in Bun, possibly with setImmediate? Any ideas about how this might happen?
I'm running postgres via Effect-ts sql-pg with the following options
If this is too little information to be helpful or useful feel free to close the issue. I'm sorry it's vague!
The text was updated successfully, but these errors were encountered: