JavaScript heap out of memory
See original GitHub issuebtc-rpc-explorer sometimes crashes while running but not actively serving webpages with FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
Environment:
- Bitcoin Core 18.0
- NodeJS 10.15.3
- Code Version / Commit [e.g. ab6cde8]
- 2 GB RAM with 4 GB swap
Screenshots or Log Output
<--- Last few GCs --->
[7042:0x1b4ce58] 11672336 ms: Mark-sweep 698.2 (723.9) -> 698.2 (724.9) MB, 9005.3 / 0.0 ms (average mu = 0.076, current mu = 0.001) allocation failure scavenge might not succeed
<--- JS stacktrace --->
==== JS stack trace =========================================
0: ExitFrame [pc: 0x2576ae9c]
Security context: 0x22d12705 <JSObject>
1: handleWriteReq(aka handleWriteReq) [0x5c58b675] [internal/stream_base_commons.js:23] [bytecode=0x5d3d9199 offset=139](this=0x2098438d <undefined>,req=0x29ce37a1 <WriteWrap map = 0x3e6301b1>,data=0x29ce3765 <Very long string[199423]>,encoding=0x22d23d99 <String[4]: utf8>)
2: writeGeneric(aka writeGeneric) [0x5c589185] [internal/stream_base_commons.js:71] [...
FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
Aborted
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (7 by maintainers)
Top Results From Across the Web
How to Fix JavaScript Heap Out of Memory Error - MakeUseOf
A common problem while working on a JavaScript Node.js project is the “JavaScript heap out of memory” error. This error usually occurs when ......
Read more >Node.js heap out of memory - Stack Overflow
You can set the node options using an environment variable if you cannot pass them on the command line.
Read more >JavaScript heap out of memory - Snyk Support
This generally occurs on larger projects where the default amount of memory allocated by Node (1.5gb) is insufficient to complete the command successfully....
Read more >How to solve JavaScript heap out of memory error
To fix JavaScript heap out of memory error, you need to add the --max-old-space-size option when running your npm command. ... Alternatively, you ......
Read more >JavaScript Heap Out Of Memory Error - OpenReplay Blog
A quick solution that you can use to fix "Heap Out Of Memory Error" in JavaScript. We lay out the causes and how...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Thanks for the update. Will try to prioritize a deeper investigation.
Here’s another snippet from a recent crash in case it helps.