-
Notifications
You must be signed in to change notification settings - Fork 348
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
The error The script will never generate a response
on Cloudflare Workers.
#4201
Comments
I've ran into this and am tracking it here cloudflare/workers-rs#255 |
oh this isn't wasm, nvm then! |
Just checking @samdenty . Your issue has been fixed right? |
Hello, I'm seeing the same error when running a mesh gateway hosted on cloudflare. We are currently running some load tests to see if it is fit for purpose and occasionally see the same error as mentioned above. @ardatan I have followed the same as the example and I still get the same. |
Could you create a new issue with a reproduction? Thanks! |
Issue workflow progress
Progress of the issue based on the Contributor Workflow
Describe the bug
I have deployed and running graphql-mesh on Cloudflare Workers.
When accesses increase, the status 500 error
The script will never generate a response
is returned at a high frequency.After investigating the cause, I found it mentioned here that storing a Promise in a global level variable and using it causes the error. This is due to the fact that the Cloudflare Workers runtime is V8 isolate.
Eventually I came to the conclusion that the script (.mesh/index.ts) generated by the
mesh build
was the cause.My Worker code is as follows.
To Reproduce
Steps to reproduce the behavior:
.mesh
bymesh build
.Expected behavior
Expect to be able to access it without error.
Environment:
@graphql-mesh/cli
: 0.75.3@graphql-mesh/graphql
: 0.29.5@graphql-mesh/transform-naming-convention
: 0.10.61@graphql-mesh/transform-prefix
: 0.11.60@graphql-yoga/common
: 2.12.3graphql
: 16.5.0Additional context
Using DO (Durable Objects) would have solved the problem, but I would like to know if there is a way to get it running stably without using DO.
The text was updated successfully, but these errors were encountered: