Skip to content

Conversation

@thomasgauvin
Copy link
Contributor

No description provided.

@github-actions github-actions bot added product:hyperdrive Hyperdrive: https://developers.cloudflare.com/hyperdrive/ product:workers Related to Workers product September 2025 labels Sep 25, 2025
@github-actions
Copy link
Contributor

This PR requires additional review attention because it affects the following areas:

Partials

This PR updates partial files, which are pieces of content used across multiple files in our Render component.

@github-actions
Copy link
Contributor

This pull request requires reviews from CODEOWNERS as it changes files that match the following patterns:

Pattern Owners
/src/content/docs/hyperdrive/ @elithrar, @thomasgauvin, @sejoker, @oxyjun, @cloudflare/pcx-technical-writing
/src/content/docs/workers/ @cloudflare/workers-docs, @GregBrimble, @irvinebroque, @mikenomitch, @korinne, @WalshyDev, @cloudflare/deploy-config, @cloudflare/pcx-technical-writing, @kodster28, @cloudflare/wrangler, @cloudflare/workers-runtime-1
/src/content/partials/hyperdrive/ @elithrar, @thomasgauvin, @sejoker, @oxyjun, @cloudflare/pcx-technical-writing

@thomasgauvin thomasgauvin enabled auto-merge (squash) September 25, 2025 15:33
Copy link
Contributor

@irvinebroque irvinebroque left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we tell people not to do this explicitly?

@thomasgauvin thomasgauvin merged commit 6683a39 into production Sep 25, 2025
11 checks passed
@thomasgauvin thomasgauvin deleted the thomasgauvin-remove-sql-end branch September 25, 2025 19:56
@thomasgauvin
Copy link
Contributor Author

thomasgauvin commented Sep 25, 2025

should we tell people not to do this explicitly?

The memory of the fetch handler context is purged on every invocation, so Workers takes care of closing I/O context and therefore db connections (in the Worker memory).

It is ok to run ctx.waitUntil(sql.end()) which will close the connection between the Worker isolate and Hyperdrive, but we have had some folks report that this was causing issues, partly because of driver bugs that we've reported. To avoid this noise, we are not documenting it (and it's also simpler, as effective).

We are going to be writing a new doc section on how connections between Worker, Hyperdrive and the origin database work to clarify some of these things.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

product:hyperdrive Hyperdrive: https://developers.cloudflare.com/hyperdrive/ product:workers Related to Workers product September 2025 size/s

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants