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.

    Sleep for updatenotification loop -- Help with JS needed

    Scheduled Pinned Locked Moved Troubleshooting
    1 Posts 1 Posters 909 Views 1 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.
    • H Offline
      Hawking
      last edited by

      Hi,
      I’m running MM on a PiZero, which has a comparable small amount of memory and to have a long lasting SD card, I put some tmp directories in memory and disabled swap. It works fine, however, once the update process of the default updatenotification module starts, I quickly run out of memory and the browser crashes. By changing the updateinterval, I verified that it is indeed due to the updatenotification module. I think this is because all modules are checked at the same time. I’ve 10 installed modules plus the default ones. All these parallel update processes consume quite some memory.

      I think I found the responsible loop “for (moduleName in modules)” in MagicMirror/modules/default/updatenotification/node_helper.js

      However I didn’t manage to put in some sleep command between each execution of the items in the loop. My knowledge of JS is very limited and I was not able to adapt the code examples found here https://stackoverflow.com/questions/3583724 to the MM code. I hope that somebody of you can help me with this issue.

      For me a hard coded sleep time would be totally fine, but of course an official change with a parameter that can be changed in the config file (or an option, that would make the different simpleGits run one after each other) would be even better.

      Already many thanks for your help!

      1 Reply Last reply Reply Quote 1
      • 1 / 1
      • 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