-
Notifications
You must be signed in to change notification settings - Fork 43
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
Frequent "Promise will never complete" and "call to released function" errors in the fetch example #57
Comments
I'll check this later, thanks! |
I have a similar thing going on -- below is relevant data thus far: I set wrangler to local mode in order to see the errors.
Here is my code(It's hacked together from multiple of your examples @syumai)
|
I think it's likely my use of encoding/json and tinygo not having reflect fully implemented yet(although it looks like we're closer to having it) --- tinygo-org/tinygo#2660 I'm unsure if it's similar for your fetch example. I attempted to unmarshal into a map instead of a struct and I still get the reflection error. I'm still digging currently though. |
Yep, that ended up being exactly what it was. I attempted to use json.Decode instead of unmarshal but I think it still uses reflect under the hood somewhere. I removed encoding/json and implemented my own json parser for the specific section I was in and it ran well right away locally. I then published my code and was able to get 15 requests per second handled without any errors in production workers. Here was the final sizing of my uploaded package - Total Upload: 844.29 KiB / gzip: 272.16 KiB |
@AdjectiveAllison |
Hey.
I'm running the fetch example (
_examples/fetch/main.go
) under a free worker plan. When making about 2-3 requests per second the example works quite well, however, when the request rate increases to about 5 request per second the example starts to run into these errors:The text was updated successfully, but these errors were encountered: