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

JavaScript heap out of memory for large networks #68

Open
hbruch opened this issue Dec 27, 2019 · 1 comment
Open

JavaScript heap out of memory for large networks #68

hbruch opened this issue Dec 27, 2019 · 1 comment

Comments

@hbruch
Copy link

hbruch commented Dec 27, 2019

Matching a larger network, I got a heap out of memory exception (see below).

I wonder, if there is a better way than adding a hardcoded --max-old-space-size=xxx to bin/run like that:

#!/usr/bin/env node --max-old-space-size=8192

Exception without added --max-old-space-size:

<--- Last few GCs --->

[56340:0x110000000]    16976 ms: Scavenge 1355.0 (1425.8) -> 1348.9 (1444.3) MB, 4.6 / 0.0 ms  (average mu = 0.177, current mu = 0.054) allocation failure
[56340:0x110000000]    17950 ms: Mark-sweep 1363.8 (1444.3) -> 1350.8 (1436.8) MB, 962.7 / 0.0 ms  (average mu = 0.130, current mu = 0.057) allocation failure scavenge might not succeed
[56340:0x110000000]    17971 ms: Scavenge 1364.5 (1436.8) -> 1352.5 (1439.8) MB, 4.3 / 0.0 ms  (average mu = 0.130, current mu = 0.057) allocation failure


<--- JS stacktrace --->

==== JS stack trace =========================================

    0: ExitFrame [pc: 0x38d32c7dbe3d]
    1: StubFrame [pc: 0x38d32c7934b0]
Security context: 0x3259ca21e6e9 <JSObject>
    2: toObject [0x32592a87ed71] [.../.config/yarn/global/node_modules/sharedstreets/node_modules/sharedstreets-pbf/proto/sharedstreets.js:~2595] [pc=0x38d32cbd63ab](this=0x3259033a7c01 <JSFunction SharedStreet.

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

@lmz
Copy link

lmz commented May 13, 2022

I've had luck setting this through the environment variable, NODE_OPTIONS

e.g.

export NODE_OPTIONS=--max_old_space_size=8192

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

2 participants