Hello,
My Raspberry Pi still freeze sometimes and don’t respond very well because of the load.
So I’ve increased the swapfile from 100 to 1024 Mo.
sudo nano /etc/dphys-swapfile
CONF_SWAPFILE=100 → CONF_SWAPFILE=1024
sudo /etc/init.d/dphys-swapfile restart
Source : Increase size of existing swap file - Raspberry Pi Forums
ppr