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

Wasm memory preparation error #34

Open
kino-ma opened this issue Feb 13, 2022 · 2 comments
Open

Wasm memory preparation error #34

kino-ma opened this issue Feb 13, 2022 · 2 comments

Comments

@kino-ma
Copy link
Owner

kino-ma commented Feb 13, 2022

Sometimes Node fails to prepare a Wasm memory with the following error.
This occurs when the number of invokers reached around 45-60, but not always.

failed to asynchronously prepare wasm: RangeError: WebAssembly.instantiate(): Out of memory: wasm memory
[RangeError: WebAssembly.instantiate(): Out of memory: wasm memory]
node:internal/process/promises:246
          triggerUncaughtException(err, true /* fromPromise */);
          ^

Error [RangeError]: WebAssembly.Instance(): Out of memory: wasm memory
    at Object.<anonymous> (/home/kino-ma/serverless-edge/node_modules/faas-app/faas_lib.js:145:22)
    at Module._compile (node:internal/modules/cjs/loader:1097:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1149:10)
    at Module.load (node:internal/modules/cjs/loader:975:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Module.require (node:internal/modules/cjs/loader:999:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object.<anonymous> (/home/kino-ma/serverless-edge/server/invoker/workers/wasm.js:4:14)
    at Module._compile (node:internal/modules/cjs/loader:1097:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1149:10)

Node.js v17.1.0
@kino-ma
Copy link
Owner Author

kino-ma commented Feb 13, 2022

This problem is related to the size of virtual memory that Node.js can use (nodejs issue).
I can avoid the error by running ulimit -v unlimited before starting the server.

@kino-ma kino-ma closed this as completed Feb 13, 2022
@kino-ma
Copy link
Owner Author

kino-ma commented Feb 13, 2022

I can avoid the error by running ulimit -v unlimited before starting the server.

This did not solve the issue actually

@kino-ma kino-ma reopened this Feb 13, 2022
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

1 participant