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-trace causes "heap out of memory" for big logs #3

Open
orestisfl opened this issue Jul 14, 2020 · 0 comments
Open

wasm-trace causes "heap out of memory" for big logs #3

orestisfl opened this issue Jul 14, 2020 · 0 comments

Comments

@orestisfl
Copy link
Contributor

Issue is that the trace.write calls like this one:
https://github.com/wasm3/wasm-trace/blob/8f1aa89e811e221a83a89a6de806599d8df6f0cd/wasm-trace.js#L283
return false after a while and the whole output gets buffered. Eventually, node runs out of memory.

Node's memory can be increased with --max-old-space-size= but I've encountered situations where any size increase is eventually not enough.

As a solution, wasm-trace can wait for 'drain' events or can use a synchronised API like fs.writeSync.

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

No branches or pull requests

1 participant