-
Notifications
You must be signed in to change notification settings - Fork 258
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
Possible issue with cloudflare workers caused by a canceled promise #865
Comments
A more minimal repro with a better error message
|
I found the solution β pocketbase/pocketbase#2185 (comment) I have to recreate the db client with each new request! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Edit: I found the solution β . I have to recreate the db client with each request.
Hi π
I'm not entirely sure of the exact cause of this issue but I created a minimal repro. maybe someone can pinpoint the source of the issue.
Here's the repo
https://github.com/unlocomqx/cloudflare-error-1101
Here's the deploy to see the issue directly (The problem occurs once every two requests)
https://b8aef2ad.cloudflare-error-1101.pages.dev/db
The repo also has instructions to see the issue locally
Here's the error from wrangler
Error
β [ERROR] A hanging Promise was canceled. This happens when the worker runtime is waiting for a Promise from JavaScript to resolve, but has detected that the Promise cannot possibly ever resolve because all code and events related to the Promise's I/O context have already finished.β [ERROR] Uncaught (in response) Error: The script will never generate a response.
The text was updated successfully, but these errors were encountered: