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

[BUG] JavaScript heap out of memory error on Raspberry Pi 3B+ #350

Closed
mezakos opened this issue Dec 3, 2021 · 2 comments
Closed

[BUG] JavaScript heap out of memory error on Raspberry Pi 3B+ #350

mezakos opened this issue Dec 3, 2021 · 2 comments
Assignees
Labels
🐛 Bug [ISSUE] Ticket describing something that isn't working

Comments

@mezakos
Copy link

mezakos commented Dec 3, 2021

Environment

Self-Hosted (Docker)

Version

1.9.3

Describe the problem

I'm trying to run dashy on a Raspberry Pi 3B+ with docker. I'm using the lissy93/dashy:arm32v7 image. The container is not able to start up because during the yarn build process I get the following error:

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

<--- Last few GCs --->

[61:0x2d535f0]   169058 ms: Mark-sweep 228.3 (231.3) -> 228.1 (231.5) MB, 2481.7 / 0.2 ms  (average mu = 0.272, current mu = 0.227) allocation failure scavenge might not succeed
[61:0x2d535f0]   171221 ms: Mark-sweep 228.5 (231.5) -> 228.3 (231.5) MB, 1480.5 / 0.3 ms  (average mu = 0.289, current mu = 0.316) allocation failure scavenge might not succeed


<--- JS stacktrace --->

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

    0: ExitFrame [pc: 0x11c3560]
    1: StubFrame [pc: 0x115c400]
Security context: 0x43240469 <JSObject>
    2: /* anonymous */(aka /* anonymous */) [0x33393c25] [/app/node_modules/webpack-sources/lib/applySourceMap.js:~58] [pc=0x2c0ba204](this=0x4b440279 <undefined>,0x373d4f9d <String[13]: parentNode===>,0x546e506d <Object map = 0x30a9c69d>)
    3: walk(aka SourceNode_walk) [0x2999cac1] [/app/node_modules/source-map/lib/source-node.js:~...

error Command failed with signal "SIGABRT".
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
ERROR: "build-watch" exited with 1.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.```


### Additional info

_No response_

### Please tick the boxes

- [X] You are using a [supported](https://github.com/Lissy93/dashy/blob/master/.github/SECURITY.md#supported-versions) version of Dashy (check the first two digits of the version number)
- [X] You've checked that this [issue hasn't already been raised](https://github.com/Lissy93/dashy/issues?q=is%3Aissue)
- [X] You've checked the [docs](https://github.com/Lissy93/dashy/tree/master/docs#readme) and [troubleshooting](https://github.com/Lissy93/dashy/blob/master/docs/troubleshooting.md#troubleshooting) guide
- [X] You agree to the [code of conduct](https://github.com/Lissy93/dashy/blob/master/.github/CODE_OF_CONDUCT.md#contributor-covenant-code-of-conduct)
@mezakos mezakos added the 🐛 Bug [ISSUE] Ticket describing something that isn't working label Dec 3, 2021
@mezakos
Copy link
Author

mezakos commented Dec 3, 2021

I found a workaround: I added -e NODE_OPTIONS='--max-old-space-size=2048' and it worked. I'm also using ZRAM. Thanks for the awesome software!

@mezakos mezakos closed this as completed Dec 3, 2021
@Lissy93
Copy link
Owner

Lissy93 commented Dec 3, 2021

Glad you've got it working :)
This is an issue, as initial build with Node causes the memory usage to spike on first compile/ and during auto updates if enabled. It's something I'm looking to address properly long term, but in the meantime I'll add your workaround to the docs :)

Feel free to reach out again if you find anything else that's not as expected :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 Bug [ISSUE] Ticket describing something that isn't working
Projects
None yet
Development

No branches or pull requests

2 participants