AcalaNetwork / bodhi.js

Apache License 2.0
33 stars 21 forks source link

JavaScript heap out of memory on v2.9.1 #1050

Closed zjb0807 closed 2 days ago

zjb0807 commented 5 days ago

<--- Last few GCs --->

[1:0x7f9ae0dd6020] 163665830 ms: Mark-sweep 2001.8 (2080.9) -> 1984.9 (2079.2) MB, 5824.8 / 0.1 ms (average mu = 0.199, current mu = 0.059) allocation failure; scavenge might not succeed [1:0x7f9ae0dd6020] 163666672 ms: Scavenge 1999.5 (2079.6) -> 1989.6 (2079.4) MB, 48.7 / 0.0 ms (average mu = 0.199, current mu = 0.059) task; [1:0x7f9ae0dd6020] 163668846 ms: Scavenge 2001.5 (2079.9) -> 1992.5 (2079.9) MB, 35.6 / 0.0 ms (average mu = 0.199, current mu = 0.059) task;

<--- JS stacktrace --->

FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory

shunjizhan commented 5 days ago

how much memory does the machine have, and what's the current MAX_CACHE_SIZE? can you try decrease MAX_CACHE_SIZE

shunjizhan commented 5 days ago

it could be api's issue... it does not a limit on memo, so we might still need to go back to using storage query helper.

https://github.com/polkadot-js/api/issues/5981

zjb0807 commented 3 days ago

eth-rpc-adapter exited

/app/node_modules/@polkadot/api/cjs/base/Init.js:152
            throw new Error('Unable to retrieve header and parent from supplied hash');
                  ^

Error: Unable to retrieve header and parent from supplied hash
    at ApiPromise._getBlockRegistryViaHash (/app/node_modules/@polkadot/api/cjs/base/Init.js:152:19)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

Node.js v18.20.4