Read the statement by Michael Teeuw here.
"Out of memory" issues - where do I begin?
-
Cool. I download the latest one and try it out.
Glad I can help you keep improving your code! lol
-
@ember1205 said in "Out of memory" issues - where do I begin?:
Glad I can help you keep improving your code! lol
me too… thought I had handled that… guess not
-
Based on the directions you gave in this thread, the run-start.sh script won’t work. I didn’t take the time to look through the github content to see if this is covered there, but you have to do
chmod +x run-start.sh
Or the script won’t actually execute. Based on old habits, I was executing the chmod statement without even thinking about it. But, after downloading the newest script, I purposefully left it untouched and it wouldn’t run.
-
@ember1205 hm, thought it was uploaded with exec. will check this evening. have doctor appt shortly
thanks for the info
-
I simply opened the github page, copied the link, and used wget to download it to the mirror. So, it’s entirely possible that the way I downloaded it was partly to blame. Figured I would mention it because I’m likely not the only one that might run into this, and at a minimum it could become a troubleshooting step if others run into issues.
-
@ember1205 thx. wget & curl won’t copy the execute permissions. when I install this on a pi 0 I chmod it to executable
-
You can’t make this stuff up…
Mirror has been running for a couple of hours now without crashing as it has been doing intermittently in the past. However, there is now a “pop up” on the screen stating that Chromium couldn’t be updated and that I’m missing out on features and fixes.
I found what might be a fix in the way of potentially “configuring” Chromium to ignore updates, but I won’t know if this truly works until probably tomorrow at the earliest.
-
I’m now about 2.5 days into two MM’s running without crashes using Chromium instead of Electron. I’ve also not seen a return of the pop up from Chromium about needing to be updated.
For those that might need to correct the update issue, here’ s what I did on my mirrors:
sudo touch /etc/chromium-browser/customizations/01-disable-update-check;echo CHROMIUM_FLAGS=\"\$\{CHROMIUM_FLAGS\} --check-for-update-interval=31536000\" | sudo tee /etc/chromium-browser/customizations/01-disable-update-check
-
@ember1205 cool. thx for that info. I will add it to my install script for pi0!!
-
UPDATE: At this point, I’m closing in on a full week of operating two mirrors without issue. I’ve changed to running Chromium instead of Electron and it’s working well all around. Here are some details of the operation in case it’s useful:
- Pi 3 Model B (one UK, one China)
- MM 2.12.0
- Native modules configured: WeatherForecast, CurrentWeather (both weather modules set to different locations as the two Pi’s are in different locations), clock, calendar (2 instances, 2 different Google calendars), alert, updatenotification
- Third-party modules: MMM-ImagesPhotos (@sdetweil version)
- Customizations:
-
- Modified the WeatherForecast module according to this thread to get 5 days of forecast data back after recent MM update: https://forum.magicmirror.builders/topic/13187/weatherforecast-showing-only-two-days/31?_=1601303807634
-
- Converted to using Chromium instead of Electron locally as detailed in this thread
-
- Chromium update / notice disabled via the step from a couple of posts prior to this one
-
- Allow connections from local LAN addresses
- Pi connected to a smart plug that turns on each day at 7AM, cron job to execute “init 0” each day at 11PM, smart plug turns off at 11:05PM
Prior to successfully switching over to Chromium, the devices would crash at least once every other day (at least one of them would crash during a 48 hour window), although it was much more common to see each one crash multiple times per day. There was no consistency to which one would crash, why, when, etc. The “crash” in question was a black screen on the mirror and no visible info being output although the mouse cursor would sometimes appear. I wrote a cron job that would run every five minutes, look up the location of the pm2 error logs, check to see if there was an “out of memory” error in the log, and do a restart of MM if there was (the restart consisted of shut down, log flush, and start). This job ran every five minutes and would silently exit if there was no error as the mirror was running ok.
Since the switchover, I have seen zero crashes on either device in almost seven days of operation.
Electron has been discussed ad nauseum as having a variety of shortcomings, bugs, issues, etc. - especially in the old version being used with MM. At this point, I have to wonder why it’s still not only the default but the ‘only’ browser that’s really discussed for use with MM. It would seem that it’s time to either forklift an upgrade to it within MM or switch to something else (at a minimum, at least provide a well-documented alternative).
I’m grateful to @sdetweil for his assistance with this, especially since it really took a calendar year almost to get to a point where it’s seemingly working as expected now.