Get a Pi with more memory? The Zero range only have 0.5GB and they aren't suited for big tasks. The Pi 2B, 3B and 3B+ have 1GB (still best suited for low resource tasks). The Pi 4B is available in 1GB, 2GB, 4GB or 8GB and the Pi 5 currently in 4GB and 8GB versions.and eventually just kills the process because the board runs out of memory.
[edit] This is based on Raspberry Pi OS. I don't know if Ubuntu Server does it the same way. Quite possibly not! I haven't used Ubuntu for a long time and Raspberry Pi OS is the best supported OS for the Raspberry Pi.
If you are unable to use another Pi, you could increase the size of the swap file on the Zero 2W. It will be slow, but should enable your task to complete - eventually!
Edit /etc/dphys-swapfile (sudo nano /etc/dphys-swapfile) and increase CONF_SWAPSIZE from 100 to 2048. Then reboot and you should have 2GB of swap (virtual memory) available.
If you need more than that you will also need to remove the "#" from "#CONF_MAXSWAP=2048" and change the size to match your CONF_SWAPSIZE.
Statistics: Posted by rpdom — Tue Apr 23, 2024 7:57 am