php -i | grep memory_limit
You will see something like:
As you can see, the
memory_limit value is 512 megabytes, but Magento 2 requires 2GB:
Upgrading the Magento applications and extensions you obtain from Magento Marketplaces and other sources can require up to 2GB of RAM. If you are using a system with less than 2GB of RAM, we recommend you create a swap file; otherwise, your upgrade might fail.