Ad Widget

Collapse

Single board computer has memory leak using Firefox to display Zabbix slide show...

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mmorgan
    Junior Member
    • Sep 2017
    • 26

    #1

    Single board computer has memory leak using Firefox to display Zabbix slide show...


    We would like to have a continuous slide show of graphs depicting the state of our most important server and workstation hardware in our IT center. We're currently testing a Rock64 single board as a Zabbix display device. We've also tested a Raspberry Pi as well and they both have a problem I'm hoping someone can show me how to solve. The problem is that they both run out of memory over several days of operation. (Please see zabbix graph below).

    The devices run Debian 9, MATE, Zabbix Agent, and Firefox. There are a few other applications on them like UFW and xdotool; but, that's it. They're intended as single-use machines, so they don't need anything else on them. The only thing that I've ever seen consume memory like this is a database. But, there's no databases on these units. 90% of memory appears to be consumed by the browser (please see ps output below). As I recall, Chromium did the same thing on the Pi. I haven't tested Chromium on the Rock64 as yet.

    All the devices do when they boot up is auto login to MATE with an unprivileged account, start and auto login to Zabbix with an account used to display a specific slide show (the Zabbix login screen is the Firefox default page), and then run the slide show until the next reboot (please see bash script below). If we can stabilize the memory, I believe these devices will make great, inexpensive displays. It looks fantastic on the 55" TV that I've been testing with so we'd really like to work this out. Has anyone else had as similar problem with single board computers? If so, how did you address it?


    #!/bin/bash
    export XAUTHORITY=/home/zbxdisp01/.Xauthority
    export DISPLAY=:0
    firefox &
    sleep 5
    xdotool search "Mozilla Firefox" windowactivate --sync key F11



    PID TTY STAT TIME MAJFL TRS DRS RSS %MEM COMMAND
    1855 ? Sl 158:03 517 0 1913220 226108 5.6 firefox-esr
    1901 ? Sl 193:13 729 0 4888452 3444496 85.6 /usr/lib/firefox-esr/firefox-esr -contentproc -greomni /usr/li




  • mmorgan
    Junior Member
    • Sep 2017
    • 26

    #2
    I forgot to mention that once the computer runs out of memory and Firefox crashes. All of the memory gets released (see graph below.


    Comment

    • mmorgan
      Junior Member
      • Sep 2017
      • 26

      #3
      Beg your pardon, I have a correction. Firefox doesn't actually crash, the Zabbix slideshow page crashes and all of the memory is released. Then, all that has to be done is to click the restore button on the crashed page and the slideshow starts over.

      Comment

      • jan.garaj
        Senior Member
        Zabbix Certified Specialist
        • Jan 2010
        • 506

        #4
        It can be Firefox problem - for example it's caching images, because you have a high cache threshold in your setting.
        Did you configure Firefox to minimize memory consuption? For example: caching, electrolysis (content process limit), disable extensions, .....

        IMHO the best option to detect leak is page about:memory, where you can obtain a lot of informations about consumed memory.

        Which zabbix version are you using? Maybe new release is fixing your problem - https://support.zabbix.com/browse/ZBX-12821
        Last edited by jan.garaj; 02-05-2018, 12:46.
        Devops Monitoring Expert advice: Dockerize/automate/monitor all the things.
        My DevOps stack: Docker / Kubernetes / Mesos / ECS / Terraform / Elasticsearch / Zabbix / Grafana / Puppet / Ansible / Vagrant

        Comment

        • mmorgan
          Junior Member
          • Sep 2017
          • 26

          #5
          Ah! Thank you for pointing that out. We're using Zabbix version 3.4.8 and there does appear to be a problem that (hopefully) has been solved in 3.4.9. We have seen the problem in both Chromium and Firefox, so our experience definitely matches what's been reported in ZBX-12821. Thanks again.

          Comment

          • aigars.kadikis
            Senior Member
            Zabbix Certified SpecialistZabbix Certified Professional
            • Mar 2018
            • 208

            #6
            I used to execute clean chromium in kiosk mode on startup using scenario:
            Code:
            #!/bin/sh
            rm -rf ~/.cache/chromium
            rm -rf ~/.config/chromium
            rm -rf ~/.pki
            mkdir -p ~/.config/chromium/Default
            sqlite3 ~/.config/chromium/Default/Web\ Data "CREATE TABLE meta(key LONGVARCHAR NOT NULL UNIQUE PRIMARY KEY, value LONGVARCHAR); INSERT INTO meta VALUES('version','46'); CREATE TABLE keywords (foo INTEGER);";
            chromium-browser --disable-plugins --kiosk --incognito http://zabbix.org/
            sqlite3 must be installed before:
            Code:
            apt-get install sqlite3 -y

            Comment

            • mmorgan
              Junior Member
              • Sep 2017
              • 26

              #7
              Thanks for the tip aigars.kadikis. I haven't tried that before. However, I think what I'll do is wait for the next Zabbix release to see if the memory problem has been fixed. If it isn't, I'll try your suggestion when I experiment with Chromium some more.

              Comment

              Working...