is the PHP version (7.4) you are configuring the one that is actually used by your Apache? Or could it be that it runs 7.3? Or PHP FPM which would need a seeting in /etc/php/7.4/fpm/php.ini?
does the warning go away when you set it to 513MB?
Sorry for this one - but have you restarted PHP/your webserver?
PHP can have different configurations for different environments. They are all placed in /etc/php/7.4/. There should be
cli which controls the parameters for the command line, when you execute php as you have for your answer
fpm if you are using PHP-FPM this is the one that needs changes for the processes run by the webserver. After changing you would need to restart just PHP-FPM, not your entire server
If you are using Apache’s PHP module, then there should be an apache folder and you would need to set it there and restart Apache.
What I meant is that even with Apache you have the option to use PHP-FPM or the builtin php module of Apache. Let’s see what the thing says after restart.