#Wrangler 4.50.0 breaking (?) Hyperdrive connections

12 messages · Page 1 of 1 (latest)

marble prawn
#

I suspect that this:
https://github.com/cloudflare/workers-sdk/pull/11219
Potentially caused an issue with Hyperdrive connections not working and they crash in this version of Wrangler and newer.
Error:
Error: read ECONNRESET
at TCP.onStreamRead (node:internal/stream_base_commons:216:20) {
errno: -4077,
code: 'ECONNRESET',
syscall: 'read'
}

As soon as I remove Hyperdrive and use the raw connection string for the database, it does not crash.

I am on Windows 11 x64

GitHub

Fixes SQC-652.
This fixes the problem of when a user runs
npx wrangler dev
with a Hyperdrive binding and localConnectionString pointing to a database that requires TLS. In such cases, the command w...

past iron
#

@marble prawn can you paste aredacted wrangler file so I can attempt to recreate this? Are you using localConnectionString?

marble prawn
# past iron <@852329580680708157> can you paste aredacted wrangler file so I can attempt to ...

Thank you for your message. Here is a redacted wrangler config:

"compatibility_flags": [
"nodejs_compat",
"nodejs_compat_populate_process_env",
],
"placement": {
"mode": "smart",
},
// Hyperdrive
"hyperdrive": [
{
"binding": "HYPERDRIVE",
"id": "hyperdrive id",
"localConnectionString": "postgres connection string here",
},
],

And we are using env.HYPERDRIVE.connectionString to connect to the database with Prisma. Note that this issue only started happening from Wrangler 4.50.0 and onwards. I have tested various versions of wrangler to determine that this is the version where the issue started.

Thanks again and please let me know if you need more info.

past iron
#

Thanks, and this is on Windows only? Are you using WSL or Windows for development?

past iron
#

I've replicated this and will open a bug

past iron
marble prawn
marble prawn
quiet bloom
#

Hi, I’m experiencing a similar issue as well. May I ask if you are trying to establish the connection using SSL? If so, which sslmode are you currently using?

marble prawn
quiet bloom
marble prawn
#

hmm i see