MagicMirror² v2.12.0 is available! For more information about this release, check out this topic.

MM crashing after some hours



  • Hello,

    Iam running magicmirror@2.5.0 with some modules (IP Cam, Google Maps, Wunderlist), but without restart every 6-8 hours the whole PI totally freezes.
    Iam already running conjob to restart MM or even whole PI, but I want to understand to root cause.

    How can I check for this? Do I run out of RAM or what be be cause? (PI 2 with 1GB).

    e.g. after 2 hours:

    pi@raspberrypi:~/MagicMirror $ free -w
    total used free shared buffers cache available
    Mem: 948964 363668 232508 265580 9940 342848 270028
    Swap: 0 0 0
    pi@raspberrypi:~/MagicMirror $

    How can I start to investigate? I see no clear trend that RAM e.g. goes to zero…


  • Module Developer

    @joern You could install a module like MMM-Tools that shows you the used RAM and CPU Temperature.

    There’s also ways to read out the current temperature or used RAM on the Pi using the console.
    You could look for increasing CPU temperatures ( > 75°C) after some time.



  • @joern is your Pi running at the stock 900mhz or have you clocked it up to 1000mhz? I was running mine with the built in overclock to 1000mhz and having the same issue. Reverted to 900mhz and it runs for months on end.



  • I was struggling with a crash. I logged the mem usage with SAR

    sudo apt-get install sysstat
    

    View Info Here

    Then I output to a log every few minutes so if it did crash I could go back through.

    sar -r 1 > somefile.log
    

    The exact issue I was having was with an iFrame Module iFrame-Ping:

    MMM-iFramePing

    I run a YouTube Playlist - that will eventually bring up the module by voice command.

    //iFrame Module - Contains Fox News Playlist on YouTube - Autoplay - Modest Branding (no logo) - iv Load Policy = 3 (no annotations) - Controls = 0 (no controls shown)
    {
    		module: 'MMM-iFrame-Ping',
    		position: 'top_right',
    		config: {
    		url: "https://www.youtube.com/embed/?listType=playlist&list=PLlTLHnxSVuIyeEZPBIQF_krewJkY2JSwi&index=-1&autoplay=1&modestbranding=1&iv_load_policy=3&controls=0",
    		autoRefresh: true,
    		updateInterval: 120,
    		width: "560px",
    		height: "340px",
    		scrolling: "no"
    }
    },
    

    The iFrame video was crashing the PI so I decided to increase the swapfile size. Before I increased the size my PI would make it about 2-4 hours. Now I can literally run it for days without an issue.

    sudo nano /etc/dphys-swapfile
    

    Change CONF_SWAPSIZE=100

    CONF_SWAPSIZE=1024
    

    Stop/Start the Service

    sudo /etc/init.d/dphys-swapfile stop
    sudo /etc/init.d/dphys-swapfile start
    

    You can log with SAR or just do

    free -m
    

    Some people set the swapfile to 0, but others warn against it. If you want to

    CONF_SWAPSIZE=0
    

Log in to reply