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

Adding hyperdrive to our MySQL database

Adding hyperdrive to our MySQL database on planetscale resulted in higher latency

I've started with mysql2, but then I've

I've started with mysql2, but then I've moved to a handcrafted mysql protocol implementation, hoping to avoid any unnecessary CPU overheads.

I keep getting Failed to connect to the

I keep getting Failed to connect to the provided database: Connecting to database via Cloudflare Tunnel failed: 503 Service Unavailable, only the db

I am trying to make a new Hyperdrive

I am trying to make a new Hyperdrive config but I keep getting:
"Failed to connect to the provided database: Connecting to database via Cloudflare Tunnel failed: 403 Forbidden"
"Failed to connect to the provided database: Connecting to database via Cloudflare Tunnel failed: 403 Forbidden"
As far as I can tell I setup everything exactly as my previous configuration. Tunnel setup and access policies look identical. Runnign the tunnel with debug output yield nothing so I feel like something is going wrong inside zero trust but I can't figure it out... So... apparently it takes a bit for a new access token to start working maybe? Waiting a few minutes and using an existing token it started working... 😦...

unable to configure Hyperdrive with RDS

unable to configure Hyperdrive with RDS (MySQL) , error attached
No description

can I connect to hyperdrive from within

can I connect to hyperdrive from within a worker while using a mysql2 pool? Kysely only supports using mysql connection pools and I'm getting a "the server closed the connection" error
No description

Does the local wrangler version of

Does the local wrangler version of hyperdrive behave the same as prod with regards to caching?

Hey folks, I just got this error today

Hey folks, I just got this error today Hyperdrive does not currently support MySQL multi-statement queries ```...

I want to confirm if I understand this

I want to confirm if I understand this correctly, before i make a mistake by exposing the db publicly. I have a db running on third-party cloud provider, along with a cloudflared container in the same network. Now, from this docs: https://developers.cloudflare.com/hyperdrive/configuration/connect-to-private-database/#12-connect-your-database-using-a-public-hostname ...

Hmmm alright, it's probably fine as long

Hmmm alright, it's probably fine as long as you keep it below 5 connections.

Do you have a tracking issue on GitHub?

Do you have a tracking issue on GitHub?

i'm suddenly seeing what i believe to be

i'm suddenly seeing what i believe to be increased connections from hyperdrive to my postgres server (there are many pg processes each using very little cpu), which is now pegging my server to 100% cpu usage, and that manifests in numerous "PostgresError: Timed out while waiting for an open slot in the pool." as well as CONNECTION_CLOSED errors in my logs. i don't think my traffic has increased proportionally to cause this--i've never noticed sustained CPU usage like this before and my daily requests are about what they've been for the past few weeks. what could be causing this? do i just need to scale up my server? while writing this i'm noticing a few dips down into the 30-70% range which is more reasonable but the sustained highs are still concerning to me...

Hi there!

Hi there! I'm trying to connect to Google Cloud SQL using Hyperdrive, but I'm getting an Internal Server Error and not sure how to fix it. I'm connecting via the public IP, and I've allowed all of Cloudflare's IPv4 addresses. When I use the same connection string with psql, the connection works fine, so I suspect the issue is on Cloudflare's side. Does anyone know what I should do in this case?...

Perf difference on prepared statements

Hey, I made the original post on the forum and just want to add some additional details: I think my assumption that it wasn't caching at all was incorrect. The responses just seem to be a lot slower... For example my worker with: ```...

I am working on standing up a CF tunnel

I am working on standing up a CF tunnel to connect to a local postgres DB for development tier. I have cloudflared running in a docker container and the postgres bitnami contianer running but keep receiving this error when creating my hyperdrive config via Pulumi with v6.1.0: ``` failed to make http request: POST "https://api.cloudflare.com/client/v4/accounts/<redacted>/hyperdrive/configs": 400 Bad Request { "result": null,...

Hi all,

Hi all, Do we need to create a new SQL connection for every request with Hyperdrive and close it after fetching the data, or should we create a single connection instance and reuse it? The latter approach seems more reasonable to me but it doesn't appear to work on Workers....

Neon errors

I cannot for the life of me create a hyperdrive connection to my Neon PG DB. It is always stuck in "inactive" and returns an error when attempting to use it "SERVER_ERROR: NeonDbError: Server error (HTTP status 530): error code: 1016" Is there some black magic I need to perform on the Neon side of things (because the hyperdrive side seems super simple)...

Any news on manual cache busting for

Any news on manual cache busting for hyperdrive?

Screenshot 2025-04-14 at 03.56.10

So my Hyperdrive connection with MySQL just started throwing errors, or well it started not responding. https://screen.bouma.link/fGflgtK5X2vH5wrX98nZ From the Cloudflare Dashboard everything is "Active" (Hyperdrive) and "Healthy" (the Tunnel) and cloudflared also is runnign without any log output. But workers connecting throw: ```...