Reusing DB instance with process.env

Hi everyone, now that accessing process.env is possible, when I create a db file with a connection to the db:
export const queryClient = postgres(process.env.DATABASE_URL);
export const db = drizzle({
    client: queryClient,
    schema,
    logger: false,
    casing: "snake_case",
  });


I get this error:
Error: Cannot perform I/O on behalf of a different request. I/O objects (such as streams, request/response bodies, and others) created in the context of one request handler cannot be accessed from a different request’s handler. This is a limitation of Cloudflare Workers which allows us to improve overall performance.

What's the explanation here? I thought that since every request is different, the module would be initiated per request.
Was this page helpful?