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

Memory exhaustion crash with full node sync (Node.js v9.9.0) #754

Closed
braydonf opened this issue Apr 11, 2019 · 1 comment
Closed

Memory exhaustion crash with full node sync (Node.js v9.9.0) #754

braydonf opened this issue Apr 11, 2019 · 1 comment
Labels

Comments

@braydonf
Copy link
Contributor

Versions
bcoin v1.0.2 (f57bd51 latest master branch)
nodejs v9.9.0

Expected

A full node to completely sync and not over allocate memory.

Actual

A full node will over allocate memory during the initial sync:

[debug] (chain) Memory: rss=2504mb, js-heap=1368/1425mb native-heap=1079mb
[info] (chain) Block 00000000000008079751b074b5c8c5e36e40880fa8884e5ba791586d1f0ffc63 (136400) added to chain (size=2326 txs=5 time=1.93599).

Here the memory is getting dangerously close to the max.

Reproduce

Switch to use nodejs v9.9.0:

nvm install v9.9.0

Alternatively use n v9.9.0 or another preferred method.

Start a fresh sync for mainnet:

./bin/bcoin

Watch the logs and see the js-heap grow in size until... you know the rest.

Resolution

Switch to nodejs v10, and start the sync again and watch the logs and see the js-heap does not keep growing in size.


Thanks to @tuxcanfly for identifying the issue.

@braydonf braydonf added the memory Memory issues label Apr 11, 2019
@braydonf braydonf changed the title Memory exhaustion crash with full node sync Memory exhaustion crash with full node sync (Node.js v9.9.0) May 24, 2019
This was referenced Oct 30, 2019
@braydonf
Copy link
Contributor Author

Closed by #903 as Node.js v9.9.0 is less than v10.

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

No branches or pull requests

1 participant