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 28.0k 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.
    • E Offline
      ember1205
      last edited by ember1205

      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.”

      S 1 Reply Last reply Reply Quote 0
      • S Do not disturb
        sdetweil @ember1205
        last edited by

        @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…

        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

          In my situation, the UI goes all black and the cursor appears (no mouse or keyboard connected). There’s a generic “out of memory” error entered into the log file. Restarting MM is the only way I’ve found to get it back up and running.

          The photo module I’m running is your fork with the more recent changes to allow the blurring of the same image behind the full-view image. Any thoughts on anything that could/should be added to try and capture more in the logs? Is there an increased logging level I could be using in MM itself? Stack traces when it fails? Before it fails? Anything come to mind that might give me a new avenue?

          The issue doesn’t seem to appear if I am not using the photo module. But, that could be because the other, more basic modules don’t use resources as intensively. We’ve compared notes on RPi, kernel, build, etc. and not found anything that seems to be materially different with the one exception being the specific image files in use.

          S 1 Reply Last reply Reply Quote 0
          • S Do not disturb
            sdetweil @ember1205
            last edited by sdetweil

            @ember1205 i run that module every day all day and don’t see any problem, but… try this

            edit MMM-ImagesPhotos.js

            add the line shown below

                  					img.style.top = result.targettop+"px";                    // line 271
                                                    img=null      /// add this line
            					// if another image was already displayed
            					let c = self.fg.childElementCount;
            

            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

              should it be:

              img=null;
              

              ???

              S 1 Reply Last reply Reply Quote 0
              • S Do not disturb
                sdetweil @ember1205
                last edited by

                @ember1205 trailing ; is ok either way

                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

                  Updated and restarted the MM process. I will keep the three browsers hitting it and wait and see if it errors out again. Sometimes, this can literally take days while other times it can occur multiple times in an hour.

                  S 1 Reply Last reply Reply Quote 0
                  • S Do not disturb
                    sdetweil @ember1205
                    last edited by

                    @ember1205 each browser is loading the images independantly… the server side just returns the list of images once for each

                    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

                      So, the extra “stress” isn’t actually stress on the Pi at all?

                      S 1 Reply Last reply Reply Quote 0
                      • S Do not disturb
                        sdetweil @ember1205
                        last edited by

                        @ember1205 well, the file system loading of the images will be thru the pi, but nothing else…all the display side is done in the browser (which is where it ran out of memory)

                        Sam

                        How to add modules

                        learning how to use browser developers window for css changes

                        1 Reply Last reply Reply Quote 0
                        • 1
                        • 2
                        • 3
                        • 4
                        • 5
                        • 6
                        • 7
                        • 3 / 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