componentize-py icon indicating copy to clipboard operation
componentize-py copied to clipboard

Http example doesn't work with Wasmtime 21.0.1

Open mikkelhegn opened this issue 1 year ago • 3 comments

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.

mikkelhegn avatar Jun 20 '24 13:06 mikkelhegn

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

dicej avatar Jun 20 '24 13:06 dicej

I can confirm that works.

mikkelhegn avatar Jun 20 '24 14:06 mikkelhegn

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.

dicej avatar Jun 20 '24 15:06 dicej

I believe this was addressed by https://github.com/bytecodealliance/wasmtime/pull/8849

dicej avatar Dec 20 '24 17:12 dicej