NC 21 - No OCC Output after upgrade

Nextcloud version 21.0.0
Operating system and version: Ubuntu 20.04
Apache or nginx version (eg, Apache 2.4.25): Apache 2
PHP version (eg, 7.4): PHP 7.4
The issue you are facing:

After upgrading to Nextcloud 21, i was attempting to do some of the database update commands, but now the occ command on the console is not working. Essentially even sudo -u www-data php occ gets no output. I notice that top is showing PHP eating up all the available ram on the container, after running the command. I can ctrl-c to kill the process, but if i let it run, nothing happens. Nextcloud itself is running fine, just with the database suggestions in my “overview” tab.

OCC worked fine for me in version 20 just minute before doing the 21 upgrade.

The only other odd thing is it seems that “A background job is pending that checks for user imported SSL certificates. Please check back later.” is stuck in my overview as well.

Is this the first time you’ve seen this error?: Y

Steps to replicate it:

  1. Upgrade to Nextcloud 21.0.0
  2. Run sudo -u www-data php occ
  3. Nothing happens

There was some problem with resource consumption when you have enable APCU but it wasn’t enabled for the command line version (CLI) of php:

Your php eating up RAM could be the same.

Hey there!

I am having the same problem.
Updated to Nextcloud 21 today, afterwards my (whole) server locked up - through some research (and several restarts) I found it was cron.php eating up all 32GiB of RAM and 8GiB of swap within a minute or so after starting.
I have now disabled cron, so the Nextcloud is working “fine” now, but well, I need cron obviously and as OP said, running any occ-command yields the same result - it eats up any memory available and maxes out one core. I don’t know if it might stop running eventually, but with full RAM and swap I can not test either, because I need the sever to be functional.
The thread @tflidd mentioned didn’t help me either, as running commands with PHP_MEMORY_LIMIT (sudo -u nginx PHP_MEMORY_LIMIT=512M php -f cron.php) had the same result as without.

I tried to locate which script might be causing this, but all I found was that even just running sudo -u nginx PHP_MEMORY_LIMIT=512M php -f lib/base.php) has this problem.

Edit:
I have tried again and it seems like I missed something earlier, it works now. Thank you!

Thanks! Even on PHP 7.4 This fixed my problem!