Cloudflare Developers

CD

Cloudflare Developers

Welcome to the official Cloudflare Developers server. Here you can ask for help and stay updated with the latest news

Join

Hi folks, I'm testing out hyperdrive (no

Hi folks, I'm testing out hyperdrive (no cache) and am noticing almost 3x higher query latencies than without. Note: Worker in YYZ connecting to a planetscale db in ca-central-1 wrote up a quick little benchmark (source) and...

i basically just want to have a replica

i basically just want to have a replica in another region and have cloudflare pick the closest one

Looks like you're missing a node

Looks like you're missing a node compatibility flag in your wrangler.toml. pg is the recommended driver, that one works quite well. Needs the flag though.

The integration uses the "public

The integration uses the "public Internet" approach, with connections coming from the published CF IP ranges. That said, you can set up tunnels to Planetscale on your own, same as to anywhere else. @thomasgauvin any objection to pulling the beta tag off of tunnels? Given how much usage they have these days, I think they're more than ready. Tunnels are what all our internal Hyperdrive usage goes through and we use it for a lot internally....

While I'm very curious to hear how

While I'm very curious to hear how others have tackled this, I will say that RLS is not a great UX for Hyperdrive. There's a lot of impedance mismatch between the sleight-of-hand Hyperdrive uses to achieve its performance and session-level state like RLS. The least-bad version here is probably to use something like SET ROLE myrole; SELECT my_actual_query;. This will disable caching, but Hyperdrive will RESET ALL; after returning the connection to the pool and it'll get you what you're going for without extra locks or round trips. We're still kicking around ideas for how to improve DX here in a way that's more practical....

also "import { getRequestContext } from

also "import { getRequestContext } from "@cloudflare/next-on-pages"; " <- this seems going to go away and opennext will take its place. in that case how do we set up the bindings from env?

Hello. I am building a nextjs e-commerce

Hello. I am building a nextjs e-commerce site and I will deploy it in cloudflare pages. I am writing the backend in nextjs for the first time. I am having issue in communication to the db. I am using supabase's pg database. I created a hyperdrive for the pg database. Now in the next js project I want to use the connection with Kysely. I can't find any proper docs or example on how to create the client. I can't use supabase's client side library since it doesn't support joins without FK. From my research I found that hyperdrive is the only way to acheive it, but I am having trouble setting it up. Can someone please help? TIA 🙏...

We are seeing this in production and

We are seeing this in production and having problems: Error: PostgresError: Timed out while waiting for a message from another Hyperdrive node. Can someone help us with this?...

Hello, I cannot deploy my next js app (

Hello, I cannot deploy my next js app (with the opennext adapter) with the hyperdrive binding. It keeps showing this error : "UserError: When developing locally, you should use a local Postgres connection string to emulate Hyperdrive functionality. Please setup Postgres locally and set the value of the 'WRANGLER_HYPERDRIVE_LOCAL_CONNECTION_STRING_NEON' variable or "NEON"'s "localConnectionString" to the Postgres connection string." - It's working with pnpm dev (and I understand why I would need to add this) ...

Timeout errors

Additionally, I used node-postgres but disabled Query caching in Hyperdrive, not sure if this has any impact.

thanks, makes sense. just fyi, then:

thanks, makes sense. just fyi, then: 1) that is not mentioned in the docs 2) just want to point out that the vite plugin doesn’t support -–remote, so that’s a particular bummer...

Client idle timeout

Is it usually possible to get maximum query (statement) duration limit increased? What's a reasonable limit that might be accepted? Currently running some fairly beefy KPI queries and started hitting the 60s timeout.. and now all of our internal tools have stopped working I've just submitted a limit increase request if anyone is able to help...

Wrapper cache misses

Help: Zero Cache Hits – Hyperdrive Queries Bypassing Cache Straight to DB! Hey team, I'm scratching my head over this caching mystery. Every query skips the cache and hits my Postgres DB directly (running on a Hetzner VPS), resulting in 0 cache hits for weeks. No performance magic happening here! Quick Context:...

measuring latency

Hi đź‘‹ I am using HyperDrive with my Postgres db in Oracle server located in Germany with Cloudflare workers. (I am also working n Germany)Connection is made and working without problem but the response is still slow(a bit faster than direct connection). Funny thing I found is it is very fast with mobile network while it is slow with my WiFi with same running contents. (200ms vs 2 seconds). Is this because HyperDrive needs some traffic to calculate? Right now I have no users as it is in dev. Than...

supported mysql versions

Hey folks. I apologize if this question has already been asked. I recently updated my AWS RDS cluster from MySQL 8.0 to MySQL 8.4 and it looks like it's no longer compatible with Hyperdrive. Is this a known issue? Is there a workaround?

too many subrequests

Hello everyone! I'm trying to connect to supabase postgres instance from a worker via hyperdrive using this guide https://developers.cloudflare.com/hyperdrive/examples/connect-to-postgres/postgres-drivers-and-libraries/postgres-js/ . I'm using postgres.js 3.4.7. In local it works connecting to the same database the hyperdrive is using, but on cf i got CONNECTION_TIMEOUT hitting the 10s i configured always. If i just connect directly in cf i got "too many subrequests" after 1 or 2 secs (the funct...

Hello đź‘‹

Hello đź‘‹
Does Hyperdrive supports connecting to PostgreSQL with TLS 1.3 (Ed25519)? I got this error while configuring Hyperdrive via Zero Trust Tunnel:...

Geo check SEA region

Hey there, we are facing high latency with hyperdrive. Can we know in which datacenter our hyperdrive are running on ? These are the id's of our hyperdrive 1. d8646d64296b433ab021b32c4f3a66c9...

Hi, sorry if is not the correct channel

Hi, sorry if is not the correct channel... We use this stack: Drizzle + Hyperdrive + Neon for full intensive processing. Neon has the maximum configuration, with 4,000 connections (and 10,000 pooled)....
Next