Comments (2)
A more minimal repro with a better error message
https://github.com/unlocomqx/cloudflare-svelte-bug
✘ [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. (I/O type: WritableStreamSink)
at EventEmitter.write
(file:///Users/USER/code/tests/cloudflare/my-svelte-app/node_modules/.pnpm/[email protected]/node_modules/postgres/cf/polyfills.js:182:16)
at nextWrite
(file:///Users/USER/code/tests/cloudflare/my-svelte-app/node_modules/.pnpm/[email protected]/node_modules/postgres/cf/src/connection.js:252:22)
at null.<anonymous>
(file:///Users/USER/code/tests/cloudflare/my-svelte-app/node_modules/.pnpm/[email protected]/node_modules/postgres/cf/polyfills.js:224:7)
at new Query
(file:///Users/USER/code/tests/cloudflare/my-svelte-app/node_modules/.pnpm/[email protected]/node_modules/postgres/cf/src/query.js:35:9)
at sql2
(file:///Users/USER/code/tests/cloudflare/my-svelte-app/node_modules/.pnpm/[email protected]/node_modules/postgres/cf/src/index.js:113:11)
at load
(file:///Users/USER/code/tests/cloudflare/my-svelte-app/.svelte-kit/output/server/entries/pages/_page.server.js:7:23)
at load_server_data
(file:///Users/USER/code/tests/cloudflare/my-svelte-app/.svelte-kit/output/server/index.js:1008:42)
at null.<anonymous>
(file:///Users/USER/code/tests/cloudflare/my-svelte-app/.svelte-kit/output/server/index.js:2538:24)
{
query: 'SELECT * FROM users',
parameters: [],
args: [],
types: []
}
from postgres.
I found the solution ✅
pocketbase/pocketbase#2185 (comment)
I have to recreate the db client with each new request!
from postgres.
Related Issues (20)
- feat: support 'using' syntax and [Symbol.dispose]
- Getting Inserted id HOT 2
- Transforming undefined to `DEFAULT` HOT 1
- BUG: inconsistent behaviour inserting multiple records with implicit column names and some properties undefined.
- [BUG] Escape character in url string
- Strings with apostrophe are not properly escaped
- BUG: All further queries hang if transaction scoped sql parameter is not used in some queries [with reproduction code]
- AS in Dynamic Fields Selection Not Working HOT 2
- Crash from unestablished connection
- How to make LIKE statement with dynamic subsctring? HOT 1
- Is it possible to execute a parameterized query with separate sql and bindings? HOT 1
- Unable to query structured data
- Interpolation example in docs flagged as error HOT 1
- Transactions always re-query all types leading to huge delay HOT 3
- Get the number of available connections
- exclude pg_stat_statements logging for a procedure call HOT 1
- Dot and Periods can't be used as values HOT 1
- Problem executing Common Table Expression (WITH query) HOT 3
- 👋 Is it possible to provide more information in the error output? HOT 4
- Is there a plan to support JSON path query for JSON/JSONB?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from postgres.