bitfocus / companion-pi

Bitfocus Companion enables the reasonably priced Elgato Streamdeck to be a professional shotbox surface for an increasing amount of different presentation switchers, video playback software and broadcast equipment.
http://bitfocus.io/companion
MIT License
29 stars 8 forks source link

Javascript heap out of memory on RPI4 #7

Closed gavalierm closed 1 year ago

gavalierm commented 1 year ago

Can be fixed by comment out the update.sh the line with --max-old-space-size

Julusian commented 1 year ago

2 sounds related.

How much memory does your pi have? The problem here is that decreasing it causes it to fail on some pis, so one value may not work everywhere.

As this is not an issue for 3.0, I dont think there is anything to do here

gavalierm commented 1 year ago

Note: Yes it is the same as #2 You can close this.

Little snippet from my custom instalation code

I have 8GB RPI4

# revert back to the 2.4.2
git reset --hard dd11d9c466d1fab8ff0a50f12af72fa1e4b8cfdf #pi

#update leak memory so i need do some teaks
LINE_A="    export NODE_OPTIONS=--max-old-space-size=8192 # some pi's run out of memory"
LINE_B="    #export NODE_OPTIONS=--max-old-space-size=8192 # some pi's run out of memory #GAVO"

if grep -Fxq "$LINE_A" update.sh; then
     cp update.sh ~/update_bak.sh
     # code if found
     sed -i "s/$LINE_A/$LINE_B/g" update.sh
      echo "Leak handled"
fi

# run the update script
./update.sh $GIT_MASTER #without leak the memory