componentize-py
componentize-py copied to clipboard
Http example doesn't work with Wasmtime 21.0.1
Trying to run the http example using wasmtime 21.0.1, I get the following error:
Error: memory index 0 has a minimum page size of 223 which exceeds the limit of 160
On my setup, using wasmtime-cli 18.0.0 it works as documented.
Does wasmtime serve -O pooling-allocator=n -S cli <component-filename> work? As of recent versions of Wasmtime, the pooling allocator is used by default, and it has a memory limit of 10MB, which is too small for even minimal Python (or .NET) apps. The memory limit can't be overridden from the CLI, unfortunately, so the only way to avoid it is to disable the pooling allocator entirely.
I think the solution would be to open a PR on Wasmtime that:
- Changes the default memory limit in the pooling allocator to something like 100MB
- Allows the default to be overridden via a CLI option
- Provides a helpful suggestion to use that option when the above error occurs
I can confirm that works.
https://github.com/bytecodealliance/wasmtime/pull/8849 should address this, although we'll probably need to wait until Wasmtime 23 for it to land in a release.
I believe this was addressed by https://github.com/bytecodealliance/wasmtime/pull/8849