MagicMirror Forum
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • Register
    • Login
    A New Chapter for MagicMirror: The Community Takes the Lead
    Read the statement by Michael Teeuw here.

    "Out of memory" issues - where do I begin?

    Scheduled Pinned Locked Moved Solved Troubleshooting
    65 Posts 2 Posters 27.1k Views 2 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • S Offline
      sdetweil @ember1205
      last edited by sdetweil

      @ember1205 but the other browsers kept going?

      i don’t think the symbols are available,certainly not for modules, if that is where the problem is
      I would add MMM-Logging (my version) which merges the logs from browser and node_helpers into one log

      https://github.com/sdetweil/MMM-Logging

      Sam

      How to add modules

      learning how to use browser developers window for css changes

      1 Reply Last reply Reply Quote 0
      • E Offline
        ember1205
        last edited by

        Hmmm. Not sure about other browsers since I had shut those down. I’ll wait until it crashes again and see if a secondary browser will keep running.

        1 Reply Last reply Reply Quote 0
        • E Offline
          ember1205
          last edited by

          I have confirmed that only Electron crashes on the Pi itself. The MM server does not experience any hiccups and remote browser connections remain functional.

          I at least now understand WHAT is crashing. Next steps might be to figure out WHY it’s crashing and potentially remedy it.

          S 1 Reply Last reply Reply Quote 0
          • S Offline
            sdetweil @ember1205
            last edited by

            @ember1205 note that we are trailing release of electron quite significantly (we are on 6.1.7 and latest is 9.x.x) … you might try moving up to a different version, no guaranty that MM will run tho… or what the other impacts are…

            as i said back a few, with a minor startup change, you can get chromium to be the viewer on the pi.

            Sam

            How to add modules

            learning how to use browser developers window for css changes

            1 Reply Last reply Reply Quote 0
            • E Offline
              ember1205
              last edited by

              I’ve made the change to Chromium - we’ll see how that does going forward.

              I do recall reading plenty about the severe lag of Electron in terms of the version that’s part of MM, so that part wasn’t “news” really. What I genuinely don’t understand is why this specific, basic configuration continues to have issues for me while Electron mostly does what it needs to do for so many others without creating this sort of problem.

              S 1 Reply Last reply Reply Quote 0
              • S Offline
                sdetweil @ember1205
                last edited by

                @ember1205 electron is a ‘single’ threaded app… but events happen that cause it to need to act like mutltiple threads.
                there are lots of edge cases where the timing is problematic…

                its not out of memory, its lost its way…

                i wrote a plugin/module to display pics matches with cal entries, floating above the mirror screen… (pong like moving boxes)
                electron does NOT like two windows being manipulated at the same time… took a long time to find that, always an out of memory error or hang… but not

                Sam

                How to add modules

                learning how to use browser developers window for css changes

                1 Reply Last reply Reply Quote 0
                • E Offline
                  ember1205
                  last edited by

                  Good info.

                  I’m interested to see how for the MM will make it now using Chromium instead of Electron. Since I have two with the same setup, I’ll set both to use Chromium for an additional level of testing it out.

                  Why was Electron chosen as the browser up to this point? And, what potential downsides are there to Chromium?

                  S 1 Reply Last reply Reply Quote 0
                  • S Offline
                    sdetweil @ember1205
                    last edited by

                    @ember1205 >Why was Electron chosen as the browser up to this point? And, what potential downsides are there to Chromium?

                    i don’t know and i don’t know… was way before my time.

                    Sam

                    How to add modules

                    learning how to use browser developers window for css changes

                    1 Reply Last reply Reply Quote 0
                    • E Offline
                      ember1205
                      last edited by

                      Welp…

                      No change. System still crashes on the Pi using Chromium.

                      In looking at the most recent core file, it’s still showing that electron is what’s faulting.

                      There are no running processes of chromium and electron is still being started. Something is amiss with the configuration to where your run-start.sh script is either not being called or is not launching the correct browser for some reason.

                      I’ve made no changes to run-start.sh, I’ve edited package.json so that this line is gone:

                      "start": "DISPLAY=\"${DISPLAY:=:0}\" ./node_modules/.bin/electron js/electron.js",
                      

                      And has been replaced with this one:

                      "start": "./run-start.sh",
                      

                      config/config.js has the following setting:

                      var config = {
                      	address: "0.0.0.0", 	// Address to listen on, can be:
                      							// - "localhost", "127.0.0.1", "::1" to listen on loopback interfac
                      e
                      							// - another specific IPv4/6 to listen on a specific interface
                      							// - "0.0.0.0", "::" to listen on any interface
                      							// Default, when address config is left out or empty, is "localhost
                      "
                      	port: 8080,
                      	basePath: "/", 	// The URL path where MagicMirror is hosted. If you are using a Reverse proxy
                      					// you must set the sub path here. basePath must end with a /
                      	ipWhitelist: ["127.0.0.1", "192.168.192.0/24", "::1"], 	// Set [] to allow all IP addresses
                      															// 
                      or add a specific IPv4 of 192.168.1.5 :
                      															// 
                      ["127.0.0.1", "::ffff:127.0.0.1", "::1", "::ffff:192.168.1.5"],
                      															// 
                      or IPv4 range of 192.168.3.0 --> 192.168.3.15 use CIDR format :
                      															// 
                      ["127.0.0.1", "::ffff:127.0.0.1", "::1", "::ffff:192.168.3.0/28"],
                      
                      	useHttps: false, 		// Support HTTPS or not, default "false" will use HTTP
                      	httpsPrivateKey: "", 	// HTTPS private key path, only require when useHttps is true
                      	httpsCertificate: "", 	// HTTPS Certificate path, only require when useHttps is true
                      
                      	language: "en",
                      	logLevel: ["INFO", "LOG", "WARN", "ERROR"],
                      	timeFormat: 24,
                      	units: "metric",
                      	// serverOnly:  true/false/"local" ,
                      	serverOnly:"local",
                      
                      S 1 Reply Last reply Reply Quote 0
                      • E Offline
                        ember1205
                        last edited by

                        One tweak to the run-start.sh script seems to have fixed it. I changed this line:

                        serveronly=$(grep -v '^[[:blank:]]*//'  config/config.js | grep -i serveronly: | awk '{print tolower($2)}' | tr -d ,\"\'\\r)
                        

                        To this:

                        serveronly=$(grep -v '^[[:blank:]]*//'  config/config.js | grep -i serveronly: | awk '{print tolower($1)}' | tr -d ,\"\'\\r)
                        

                        The awk command seems to have been looking for a variable that wasn’t being passed and by changing the variable number that it was looking for, it no longer starts electron and now starts chromium.

                        1 Reply Last reply Reply Quote 0
                        • 1
                        • 2
                        • 3
                        • 4
                        • 5
                        • 6
                        • 7
                        • 4 / 7
                        • First post
                          Last post
                        Enjoying MagicMirror? Please consider a donation!
                        MagicMirror created by Michael Teeuw.
                        Forum managed by Sam, technical setup by Karsten.
                        This forum is using NodeBB as its core | Contributors
                        Contact | Privacy Policy