Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cloudflare Workers: Cannot perform I/O on behalf of a different request. #219

Closed
zsilbi opened this issue May 9, 2023 · 2 comments
Closed
Assignees
Labels
bug Something isn't working needs reproduction

Comments

@zsilbi
Copy link

zsilbi commented May 9, 2023

Environment

Cloudflare Workers (non-module)
Nuxt 3.4.3
[email protected]
unstorage: 1.5.0

Reproduction

Deploy a high traffic Nuxt 3 site to CF workers.
Check logs pushed by Cloudflare Logpush.

Describe the bug

We deployed a streaming site a few days ago, expecting high traffic from the first day.
Our workers currently process more than 1000 requests per second during peak hours with a 99.99% success rate which I am very satisfied with.

The only type of error I see is in the log so far is the following:

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.

Fortunately, from the response codes it seems like the client does not experience these issues.

Additional context

No response

Logs

{
  "Event.RayID": "7c49cad46a9ab51e",
  "Event.Request.Method": "GET",
  "Event.Request.URL": "/apple-touch-icon-precomposed.png",
  "Event.Response.Status": 200,
  "EventTimestampMs": 1683633733840,
  "EventType": "fetch",
  "Logs[0].Level": "error",
  "Logs[0].Message[0]": "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 p ... <<<Logpush: message truncated>>> ... hRaw (worker.js:3113:395)",
  "Logs[0].Message[1]": "[nuxt] [request error] [unhandled] [500]",
  "Logs[0].TimestampMs": 1683633733984,
  "Logs[1].Level": "error",
  "Logs[1].Message[0]": "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 p ... <<<Logpush: message truncated>>> ... hRaw (worker.js:3113:395)",
  "Logs[1].Message[1]": "[nuxt] [request error] [unhandled] [500]",
  "Logs[1].TimestampMs": 1683633733984,
  "Outcome": "ok",
  "plugin.type": "cloudflare",
  "ScriptName": "my_script",
  "timestamp": 1683633764248
}
@zsilbi zsilbi changed the title CloudFalre Workers: Cannot perform I/O on behalf of a different request. CloudFlare Workers: Cannot perform I/O on behalf of a different request. May 9, 2023
@zsilbi zsilbi changed the title CloudFlare Workers: Cannot perform I/O on behalf of a different request. Cloudflare Workers: Cannot perform I/O on behalf of a different request. May 9, 2023
@Hebilicious Hebilicious added the bug Something isn't working label Jun 30, 2023 — with Volta.net
@Hebilicious Hebilicious self-assigned this Jun 30, 2023
@Hebilicious
Copy link
Member

Hebilicious commented Jul 5, 2023

@zsilbi Could you provide a reproduction ? I'm not sure if this is related to unstorage or nitro

@zsilbi
Copy link
Author

zsilbi commented Feb 19, 2024

I found the issue here: nuxt/icon#142

@zsilbi zsilbi closed this as completed Feb 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs reproduction
Projects
None yet
Development

No branches or pull requests

2 participants