Also, I'm having trouble connecting with

Also, I'm having trouble connecting with a local postgres DB when using hyperdrive. I've tried both using the env variable & the localConnectionString, but I keep getting this error:
✘ [ERROR] Error: write CONNECT_TIMEOUT <>.hyperdrive.local:5432

at oW
(file:///Users//workspace//node_modules/postgres/cf/src/connection.js:259:20)
at n
(file:///Users//workspace//node_modules/postgres/cf/src/connection.js:1035:8)
at cachedError
(file:///Users//workspace//node_modules/postgres/cf/src/query.js:170:23)
at new Query
(file:///Users//workspace//node_modules/postgres/cf/src/query.js:36:24)
at Object.He [as sql]
(file:///Users//workspace//node_modules/postgres/cf/src/index.js:113:11)
at getTemplatesV2

code: 'CONNECT_TIMEOUT',
errno: 'CONNECT_TIMEOUT',
address: '<>.hyperdrive.local',
port: 5432
}
✘ [ERROR] Error: write CONNECT_TIMEOUT <>.hyperdrive.local:5432

at oW
(file:///Users//workspace//node_modules/postgres/cf/src/connection.js:259:20)
at n
(file:///Users//workspace//node_modules/postgres/cf/src/connection.js:1035:8)
at cachedError
(file:///Users//workspace//node_modules/postgres/cf/src/query.js:170:23)
at new Query
(file:///Users//workspace//node_modules/postgres/cf/src/query.js:36:24)
at Object.He [as sql]
(file:///Users//workspace//node_modules/postgres/cf/src/index.js:113:11)
at getTemplatesV2

code: 'CONNECT_TIMEOUT',
errno: 'CONNECT_TIMEOUT',
address: '<>.hyperdrive.local',
port: 5432
}
app code:
return postgres(env.HYPERDRIVE.connectionString, { prepare: false });
return postgres(env.HYPERDRIVE.connectionString, { prepare: false });
wrangler.toml:
[[hyperdrive]]
binding = "HYPERDRIVE"
id = "..."
localConnectionString = "postgres://postgres:password@localhost:5432/postgres"
[[hyperdrive]]
binding = "HYPERDRIVE"
id = "..."
localConnectionString = "postgres://postgres:password@localhost:5432/postgres"
I can connect to the DB using that localConnectionString but without using Hyperdrive
2 Replies
thomasgauvin
thomasgauvin7d ago
@kchro3 what version of Wrangler are you running? there's an issue with the latest version of wrangler, we have a patch incoming to fix local dev https://github.com/cloudflare/workerd/pull/3148
GitHub
SQC-333: Revert previous changes by ReppCodes · Pull Request #3148 ...
This commit reverts 1149737. The sslmode change in the previous commit does not work as expected. Connection attempts time out, presumably getting hung while negotiating SSL upgrade. Revert this ch...
kchro3
kchro3OP7d ago
3.91.0
Want results from more Discord servers?
Add your server