Firefox crashes on a kiosk Raspberry PI

Hi,
I’m using a Raspberry Pi 4B with 4GB RAM as a kiosk device to display Grafana dashboards. To keep things minimal, I installed LXDE with Firefox, Firefox ESR, and Chromium.

However, I’m experiencing a recurring issue where the active browser tab crashes after 1-2 days. The device runs nothing else, and it seems like a memory management problem. I observe the RAM usage gradually increasing from 20% to around 90-95%. After, instead of freeing up memory, the active browser tab crashes (I have to say that the dashboard is pretty big/heavy).

Has anyone encountered similar issues or have suggestions to prevent this? Like setting DietPI to use more swap or similar?

Thanks in advance

Using swap might not solve the issue as it just will eat up more memory/swap and slow down your system.

Anyway you can create swap space using dietpi-drive_manager.

Best to check which service is going to use your memory. This can be done using htop.

Another option is to run Chromium in kiosk mode directly, without the need to start a full desktop.

1 Like

I have a USB3 SSD attached to it, so I can try with the swap.

But I can’t launch dietpi-drive_manager because every time I do it, notching happens.

And if I try with another SSH session it says that there is already a dietpi-drive_manager session running.

reboot your system and connect via SSH, launch drive manager and wait. It could take a while as drive manager tries to detect all attached device.

1 Like

Oh, okay, it was only very slow.

I launched it and saw that I was already with a swap file of about 1.5GB, so now I disabled it and I’ll see if it’s better or worse!

Thanks

usually it will crash faster if you reduce available memory, even if it was swap

You can check memory utilization using free -m

as mentioned, try to find out which process consumes the most memory

I already know that is Firefox to eat all the RAM, it’s the only process active.

But I need it, since it’s the purpose of this Raspberry PI: display Grafana dashboards.

Is it normal for a system to crash when the RAM is full? Shouldn’t the system be able to free up RAM and reload the Grafana dashboard instead?

There is no need to use Firefox. You can run Chromium in kiosk mode directly.

Basically it’s an issue of the browser app if it doesn’t give memory back.

And yes, if all your memory is gone, the operation system will go to kill process. Nothing specific to DietPi. Is a general behaviour of Linux.

This topic was automatically closed 178 days after the last reply. New replies are no longer allowed.