Skip to content
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

Http example doesn't work with Wasmtime 21.0.1 #94

Open
mikkelhegn opened this issue Jun 20, 2024 · 3 comments
Open

Http example doesn't work with Wasmtime 21.0.1 #94

mikkelhegn opened this issue Jun 20, 2024 · 3 comments

Comments

@mikkelhegn
Copy link

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.

@dicej
Copy link
Collaborator

dicej commented Jun 20, 2024

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

@mikkelhegn
Copy link
Author

I can confirm that works.

@dicej
Copy link
Collaborator

dicej commented Jun 20, 2024

bytecodealliance/wasmtime#8849 should address this, although we'll probably need to wait until Wasmtime 23 for it to land in a release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants