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

RPi Zero Update guide #2923

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from
Open

Conversation

templehasfallen
Copy link

Created a guide detailing a workaround for updating Zigbee2MQTT out-of-place when using a RPi Zero, 2, W using chroot and qemu.
This is in the likely case of users running into OOM issues on their Pi.

Created a guide detailing a workaround for updating Zigbee2MQTT out-of-place when using a RPi Zero, 2, W using chroot and qemu.
@Koenkk
Copy link
Owner

Koenkk commented Aug 1, 2024

I'm wondering if pnpm will fix this, can you try:

npm install -g pnpm
pnpm install

@templehasfallen
Copy link
Author

I'm wondering if pnpm will fix this, can you try:

npm install -g pnpm
pnpm install

Sadly this also errors out due to OOM related errors.

 WARN  GET https://registry.npmjs.org/is-stream error (EAI_AGAIN). Will retry in 10 seconds. 2 retries left.
 WARN  GET https://registry.npmjs.org/async error (EAI_AGAIN). Will retry in 10 seconds. 2 retries left.
Progress: resolved 520, reused 0, downloaded 484, added 0

<--- Last few GCs --->

[2901:0x47058a0]   198301 ms: Mark-Compact (reduce) 124.2 (129.2) -> 122.7 (128.6) MB, 317.22 / 0.00 ms  (average mu = 0.222, current mu = 0.162) allocation failure; scavenge might not succeed
[2901:0x47058a0]   199194 ms: Mark-Compact (reduce) 123.6 (128.9) -> 123.2 (128.4) MB, 745.23 / 0.17 ms  (average mu = 0.189, current mu = 0.166) allocation failure; scavenge might not succeed


<--- JS stacktrace --->

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

Aborted

I also tried setting export NODE_OPTIONS="--max-old-space-size=256" or 512, in which case it completed, but the service just kept starting/restarting without any specific errors.

@Koenkk
Copy link
Owner

Koenkk commented Aug 3, 2024

What if you configure the Pi to have a swap file? https://forums.raspberrypi.com/viewtopic.php?t=369538

@templehasfallen
Copy link
Author

What if you configure the Pi to have a swap file? https://forums.raspberrypi.com/viewtopic.php?t=369538

I went to do that but apparently already did that a while ago (I have 2G swap). This may also explain why my npm ci didn't directly fail and was still running after ~12 hours without any change.

@Koenkk
Copy link
Owner

Koenkk commented Aug 4, 2024

I wonder if it would be easier to grab to dependencies from the Docker image. Since this is quite complicated and needs to be done after every update of z2m.

Copy link
Contributor

This pull request is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 30 days

@github-actions github-actions bot added the Stale label Dec 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants