Thanks. This saved me after my upgrade from 20.0.8 to 21.0.1
After the upgrade any command I executed or the scheduled cron job Nextcloud runs was consuming all memory and swap on the server. i couldn’t even put the server in maintenance mode.
I was missing apc.enable_cli=1 in /etc/php/7.4/cli/conf.d/20-apcu.ini although I had APCu enabled in my config.php
I put this in and then restarted apache.
Now I can put the server in maintenance and look at the other issues.