All app gets automatically closed

you can increase swap easily because you are using swapfile:
remove current small file 512MB:

sudo swapoff /swapfile
sudo rm -f /swapfile

create a new one:

sudo dd if=/dev/zero of=/swapfile bs=1M count=16000 status=progress

16000=16GB
set permission:

sudo chmod 600 /swapfile

create swapfile:

sudo mkswap /swapfile

start it:

sudo swapon /swapfile

check it:

swapon --show
1 Like