From ba65dc19f03c8f8420cfa37591744a72ac5f0c2e Mon Sep 17 00:00:00 2001 From: Thomas Gauvin <35609369+thomasgauvin@users.noreply.github.com> Date: Fri, 17 Jan 2025 17:06:10 -0500 Subject: [PATCH 1/3] Feature nodejs compat issues in troubleshooting --- .../docs/hyperdrive/observability/troubleshooting.mdx | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/content/docs/hyperdrive/observability/troubleshooting.mdx b/src/content/docs/hyperdrive/observability/troubleshooting.mdx index 8254816b8ce6d8..77caeaa3d30113 100644 --- a/src/content/docs/hyperdrive/observability/troubleshooting.mdx +++ b/src/content/docs/hyperdrive/observability/troubleshooting.mdx @@ -43,6 +43,14 @@ Hyperdrive may also encounter `ErrorResponse` wire protocol messages sent by you | `Failed to acquire a connection from the pool.` | Hyperdrive timed out while waiting for a connection to your database, or cannot connect at all. | If you are seeing this error intermittently, your Hyperdrive pool is being exhausted because too many connections are being held open for too long by your worker. This can be caused by a myriad of different issues, but long-running queries/transactions are a common offender. | | `Server connection attempt failed: connection_refused` | Hyperdrive is unable to create new connections to your origin database. | A network firewall or access control list (ACL) is likely rejecting requests from Hyperdrive. Ensure you have allowed connections from the public Internet. Sometimes, this can be caused by your database host provider refusing incoming connections when you go over your connection limit. | +### Node errors + +| Error Message | Details | Recommended fixes | ------------------------------------------------------ | ----------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `Uncaught Error: No such module "node:"` | Your Cloudflare Workers project or a library that it imports is trying to access a Node module that is not available. | Enable [Node.js compatibility](https://developers.cloudflare.com/workers/runtime-apis/nodejs/) for your Cloudflare Workers project to maximize compatibility. | + | + + + ### Improve performance Having query traffic written as transactions can limit performance. This is because in the case of a transaction, the connection must be held for the duration of the transaction, which limits connection multiplexing. If there are multiple queries per transaction, this can be particularly impactful on connection multiplexing. Where possible, we recommend not wrapping queries in transactions to allow the connections to be shared more aggressively. From 062006fc768ef5ff7c5e5ebb2eb8e5cdbd91ca55 Mon Sep 17 00:00:00 2001 From: Thomas Gauvin Date: Thu, 23 Jan 2025 16:01:12 -0500 Subject: [PATCH 2/3] thomasgauvin: fix formatting on hyperdrive nodejs errors troubleshooting page --- .../docs/hyperdrive/observability/troubleshooting.mdx | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/content/docs/hyperdrive/observability/troubleshooting.mdx b/src/content/docs/hyperdrive/observability/troubleshooting.mdx index 77caeaa3d30113..b06b9b5a3dfe05 100644 --- a/src/content/docs/hyperdrive/observability/troubleshooting.mdx +++ b/src/content/docs/hyperdrive/observability/troubleshooting.mdx @@ -3,7 +3,6 @@ pcx_content_type: concept title: Troubleshoot and debug sidebar: order: 10 - --- Troubleshoot and debug errors commonly associated with connecting to a database with Hyperdrive. @@ -45,11 +44,9 @@ Hyperdrive may also encounter `ErrorResponse` wire protocol messages sent by you ### Node errors -| Error Message | Details | Recommended fixes | ------------------------------------------------------ | ----------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `Uncaught Error: No such module "node:"` | Your Cloudflare Workers project or a library that it imports is trying to access a Node module that is not available. | Enable [Node.js compatibility](https://developers.cloudflare.com/workers/runtime-apis/nodejs/) for your Cloudflare Workers project to maximize compatibility. | - | - - +| Error Message | Details | Recommended fixes | +| ------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `Uncaught Error: No such module "node:"` | Your Cloudflare Workers project or a library that it imports is trying to access a Node module that is not available. | Enable [Node.js compatibility](https://developers.cloudflare.com/workers/runtime-apis/nodejs/) for your Cloudflare Workers project to maximize compatibility. | ### Improve performance From c1ed7bae02af449bbf45ff036d058728f5b64e53 Mon Sep 17 00:00:00 2001 From: Thomas Gauvin Date: Thu, 23 Jan 2025 16:02:05 -0500 Subject: [PATCH 3/3] thomasgauvin: nit --- .../docs/hyperdrive/observability/troubleshooting.mdx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/content/docs/hyperdrive/observability/troubleshooting.mdx b/src/content/docs/hyperdrive/observability/troubleshooting.mdx index b06b9b5a3dfe05..fb12ad92baa7aa 100644 --- a/src/content/docs/hyperdrive/observability/troubleshooting.mdx +++ b/src/content/docs/hyperdrive/observability/troubleshooting.mdx @@ -44,9 +44,9 @@ Hyperdrive may also encounter `ErrorResponse` wire protocol messages sent by you ### Node errors -| Error Message | Details | Recommended fixes | -| ------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `Uncaught Error: No such module "node:"` | Your Cloudflare Workers project or a library that it imports is trying to access a Node module that is not available. | Enable [Node.js compatibility](https://developers.cloudflare.com/workers/runtime-apis/nodejs/) for your Cloudflare Workers project to maximize compatibility. | +| Error Message | Details | Recommended fixes | +| ------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | +| `Uncaught Error: No such module "node:"` | Your Cloudflare Workers project or a library that it imports is trying to access a Node module that is not available. | Enable [Node.js compatibility](/workers/runtime-apis/nodejs/) for your Cloudflare Workers project to maximize compatibility. | ### Improve performance