question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

JS heap out of memory

See original GitHub issue

Hi again,

This is the latest hickup I got. As mentioned in the title, I’m not sure it’s really a fussel issue but I document it here for the time being:

 --> Processing /mnt/Photos/110303 - Billard BPR/DSCF4562.JPG...
 ----> Copying to '/home/fussel/app/fussel/web/public/static/_gallery/albums/110303 - Billard BPR/original_DSCF4562.JPG'
 ------> Generating photo size... '/home/fussel/app/fussel/web/public/static/_gallery/albums/110303 - Billard BPR/500x661_DSCF4562.JPG'
 ------> Generating photo size... '/home/fussel/app/fussel/web/public/static/_gallery/albums/110303 - Billard BPR/800x1058_DSCF4562.JPG'
 ------> Generating photo size... '/home/fussel/app/fussel/web/public/static/_gallery/albums/110303 - Billard BPR/816x1080_DSCF4562.JPG'
~/app/fussel/web ~/app/fussel
yarn run v1.22.4
$ react-scripts build
Creating an optimized production build...

<--- Last few GCs --->

[3183:0x13b8998]  1936094 ms: Mark-sweep 613.1 (665.5) -> 612.9 (669.0) MB, 550.2 / 0.1 ms  allocation failure GC in old space requested
[3183:0x13b8998]  1936843 ms: Mark-sweep 612.9 (669.0) -> 612.8 (641.5) MB, 749.1 / 0.1 ms  last resort GC in old space requested
[3183:0x13b8998]  1937374 ms: Mark-sweep 612.8 (641.5) -> 612.8 (641.5) MB, 531.0 / 0.1 ms  last resort GC in old space requested


<--- JS stacktrace --->

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

Security context: 0x55311aa9 <JSObject>
    1: _send [internal/child_process.js:676] [bytecode=0x9ed466f1 offset=586](this=0x582f4935 <ChildProcess map = 0x2a2f1e41>,message=0x40fa5ad9 <JSArray[4]>,handle=0x55304125 <undefined>,options=0x40fa5b15 <Object map = 0x2a2f1ef1>,callback=0x55304125 <undefined>)
    2: send [internal/child_process.js:586] [bytecode=0x3349abdd offset=131](this=0x582f4935 <ChildProcess map = 0x2a2f1e41>,message=0x4...

FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Retried, got it again:

~/app/fussel/web ~/app/fussel
yarn run v1.22.4
$ react-scripts build
Creating an optimized production build...

<--- Last few GCs --->

[4074:0x134a998]  2173523 ms: Mark-sweep 682.5 (735.5) -> 682.4 (735.5) MB, 5834.5 / 0.0 ms  allocation failure GC in old space requested
[4074:0x134a998]  2181101 ms: Mark-sweep 682.4 (735.5) -> 682.4 (720.5) MB, 5880.3 / 0.0 ms  last resort GC in old space requested
[4074:0x134a998]  2187989 ms: Mark-sweep 682.4 (720.5) -> 682.4 (720.5) MB, 6888.0 / 0.2 ms  last resort GC in old space requested


<--- JS stacktrace --->

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

Security context: 0x5b991aa9 <JSObject>
    1: visitQueue [/home/fussel/app/fussel/web/node_modules/@babel/traverse/lib/context.js:~90] [pc=0x2fc073fc](this=0x307fc195 <TraversalContext map = 0x294fd0d5>,queue=0x307fc1dd <JSArray[1]>)
    2: visitSingle [/home/fussel/app/fussel/web/node_modules/@babel/traverse/lib/context.js:~82] [pc=0x2fc13d1c](this=0x307fc195 <TraversalContext map = 0x294fd0d5>,node=0x31ba4e35 <Node map = 0x4af182c1>,ke...

FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

From here, it looks like --max-old-space-size should be increased to allow more memory usage. I have 2GB of RAM plus 2GB of swap, but the latter could easily be increased to whatever I need to build the site. I’m trying to find where to up this limit in the code but might not be quick about it.

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
cbenningcommented, Jul 13, 2020

My thoughts exactly. Thanks a lot for testing this!

0reactions
miek770commented, Jul 14, 2020

You’re welcome, thanks for the great app! Please feel free to close this issue when you want.

Read more comments on GitHub >

github_iconTop 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 - javascript - Stack Overflow
I have a 64-bit CPU and I've installed x86 node version, which caused the CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory ......
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 - 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 >
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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found