Read the statement by Michael Teeuw here.
"Out of memory" issues - where do I begin?
-
Thought I would update this…
Still broken.
I have the latest MM as a fresh install on a brand new RPi with a new power adapter, using a brand new SDCard, connected to a different monitor, using a different HDMI cable, and it’s all plugged in to an outlet at an entirely different house in a different area of the state (different sections of the grid). I have the same few, basic modules installed and have added the photos module discussed here. It crashes and hangs randomly with “out of memory” errors just like the other one.
The only thing the same between the two is the photo collection. I’ve not found any consistency in the past on it failing with any specific photos so troubleshooting this seems like it’s going to be impossible.
-
@ember1205 debugging is indeed very difficult w these problems.
I wonder if running w chromium browser would produce different results.
easiest way to test
download the run-start.sh script from here
https://github.com/sdetweil/MagicMirror_scripts
into the MagicMirror folder
edit the package.json and change the start command to"start":"./run-start.sh",
edit config.js
and setserverOnly:"local",
this will start mm in server mode, and use chromium to display instead of electron
-
Would that be any different than running it in server mode and accessing it from a browser on my computer across the network? That would be simpler to set up and wouldn’t add more running software onto the Pi…
-
@ember1205 same, no new software on the pi. mm install installs everything.
can run as
full ---- how it is now
server only
server only w different browser ( already installed)
or
client only -
Understood that there isn’t new software installed, but this would mean no additional software actively running on the Pi (Electron would be stopped, and all browser software would be running from a different machine).
-
@ember1205 right. that doesn’t mean u fixed the out of memory problem. it’s possible.
I was working on one change at a time.
u can install the run-start.sh and change config.js to serverOnly: true, then launch browser from your pc
-
Your suggestion incorporates multiple changes, though… Stopping Electron and Starting Chromium while also changing the operating mode. No?
I’ve changed the config.js to both
serverOnly: true,
and
serverOnly:"true",
and neither one prevents Electron from starting.
I’ve now also tried
serverOnly:true,
-
@ember1205 u need the run-start.sh script for that parm to work
besides, u said u were going to run in server only mode anyway. and then u will have to change your startup process too
-
By adding an external browser, it crashed in only a few minutes. I’m going to let it keep running with the additional external browser to see if it causes it crash much more quickly on a more continuous basis.
If I can cause it to crash quickly on a repeated basis, it gives me an opportunity to try testing specific image files. It’s possible that this is a cumulative problem that is related to a small memory loss that gets added to on the load of additional errant files.
UPDATE: So much for that theory… I am currently running Electron plus an external instance of Chrome on Windows and Safari on MacOS. No “quick crashes.”
-
@ember1205 i spent a year debugging an out of memory that only crashed one version of a module… another ran fine…
one line of code, my code, made the difference… but the problem ‘appeared’ to be a hang , suddenly the UI was dead…
randomnly displaying pics in the background.not til I added a totally new logging approach did I find the actual problem, which was out of memory, which killed the UI, which made it LOOK hung…