You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, the emitted code for worker-build has everything defined on the top-level.
I'm not sure why, but for some reason variables defined in the top level are re-used across requests.
I'm using the cached crate in my project, and because the wasm memory is re-used across requests - it stops working and hangs with The script will never generate a response.
I'm not sure if this is the intended behaviour, re-using the wasm memory across requests - maybe it was done for perf reasons?
But anyways I've ran into this issue of randomly hanging workers loads of times, and it's really annoying. I think the default should be not to re-use memory across requests
Steps To Reproduce
No response
The text was updated successfully, but these errors were encountered:
samdenty
changed the title
worker-build should emit all code inside a closure of the fetch function
worker-build should emit all code inside a closure in a fetch function
Dec 31, 2022
samdenty
changed the title
worker-build should emit all code inside a closure in a fetch function
The script will never generate a response: worker-build should emit all code inside a closure in a fetch function
Dec 31, 2022
This only fixes the script will never generate response error for some cases, but I'm now running into cloudflare/rustwasm-worker-template#22 which I think may? be the root cause
Is there an existing issue for this?
What version of
workers-rs
are you using?0.0.0
Describe the bug
Currently, the emitted code for
worker-build
has everything defined on the top-level.I'm not sure why, but for some reason variables defined in the top level are re-used across requests.
I'm using the
cached
crate in my project, and because the wasm memory is re-used across requests - it stops working and hangs withThe script will never generate a response.
I'm not sure if this is the intended behaviour, re-using the wasm memory across requests - maybe it was done for perf reasons?
But anyways I've ran into this issue of randomly hanging workers loads of times, and it's really annoying. I think the default should be not to re-use memory across requests
Steps To Reproduce
No response
The text was updated successfully, but these errors were encountered: