Nextcloud no longer working after updating to 21

Nextcloud version (eg, 20.0.5): Nextcloud 21
Operating system and version (eg, Ubuntu 20.04): Manjaro Linux (linux 5.4)
Apache or nginx version (eg, Apache 2.4.25): Apache 2.4.46
PHP version (eg, 7.4): 8.0.3

The issue you are facing:
After updating the nextcloud package through my package manager trying to load nextcloud only gives “Internal server error”. Trying to run OCC only results in:
PHP Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 20480 bytes) in /usr/share/webapps/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php on line 133
This happens on both php versions 7.4 and 8.0.

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

The output of your Nextcloud log in Admin > Logging:

Cannot access logs since I cannot log in to web interface, and any attempts to get nextcloud to produce a log file have been met with no success

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):
https://pastebin.com/L6MH5MKi

You are not the first one: [SOLVED] Occ command; PHP Fatal error, Allowed memory size of XXX bytes exhausted - #3 by onny

I have gone through this and the posted solution did not work for me.
Specifically, adding apc.enable_cli=1 to /etc/php/conf.d/apcu.ini made no difference.

Well, this command was just for the command line interaction. The origin is that you can have this error, if you enabled apcu in your Nextcloud config file but it is not properly enabled on your system. Perhaps try to comment out the corresponding line in your Nextcloud config, and if it works then, you can try to figure out what is wrong with your apcu setup.

1 Like

So disabling apcu outright allowed occ to work, however I am still getting an internal server error when I try to use the web interface. With php now working though, nextcloud has managed to produce some logs

If you start searching with some of the terms, you can find a few github issues. Some are related to specific apps (TypeError: substr(): Argument #3 ($length) must be of type ?int, bool given in /server/test/apps/notify_push/lib/SetupWizard.php:84 · Issue #54 · nextcloud/notify_push · GitHub), other to the config with php 8 (Errors logged during 20/21 installation · Issue #22590 · nextcloud/server · GitHub), some other bug that will be fixed with NC 21.0.1 ([stable21] Register service aliases und parameters just once by backportbot-nextcloud · Pull Request #25794 · nextcloud/server · GitHub).

We don’t know what apps you are using. It’s a bit painful to go through all the links you find and check it out yourself. Apps are pretty easy if you can disable them temporarily. And it seems you don’t get the memory size error any more?

Yes, disabling apcu resolved it

Well, disabling the logreader app made the error disappear, however i’m still getting an internal server error when I try to load the page

Currently, this is all that is in the nextcloud log:

{"reqId":"Anab4OICvZ5E9kT4lIsd","level":0,"time":"April 02, 2021 02:34:58","remoteAddr":"","user":"--","app":"camerarawpreviews","method":"","url":"--","message":"/appinfo/app.php is deprecated, use \\OCP\\AppFramework\\Bootstrap\\IBootstrap on the application class instead.","userAgent":"--","version":"21.0.0.18"}
{"reqId":"Anab4OICvZ5E9kT4lIsd","level":0,"time":"April 02, 2021 02:34:58","remoteAddr":"","user":"--","app":"serverDI","method":"","url":"--","message":"The requested alias \"PreviewManager\" is deprecated. Please request \"OCP\\IPreview\" directly. This alias will be removed in a future Nextcloud version.","userAgent":"--","version":"21.0.0.18"}
{"reqId":"Anab4OICvZ5E9kT4lIsd","level":0,"time":"April 02, 2021 02:34:58","remoteAddr":"","user":"--","app":"contacts","method":"","url":"--","message":"/appinfo/app.php is deprecated, use \\OCP\\AppFramework\\Bootstrap\\IBootstrap on the application class instead.","userAgent":"--","version":"21.0.0.18"}
{"reqId":"Anab4OICvZ5E9kT4lIsd","level":0,"time":"April 02, 2021 02:34:58","remoteAddr":"","user":"--","app":"extract","method":"","url":"--","message":"/appinfo/app.php is deprecated, use \\OCP\\AppFramework\\Bootstrap\\IBootstrap on the application class instead.","userAgent":"--","version":"21.0.0.18"}
{"reqId":"Anab4OICvZ5E9kT4lIsd","level":0,"time":"April 02, 2021 02:34:58","remoteAddr":"","user":"--","app":"files_external","method":"","url":"--","message":"/appinfo/app.php is deprecated, use \\OCP\\AppFramework\\Bootstrap\\IBootstrap on the application class instead.","userAgent":"--","version":"21.0.0.18"}
{"reqId":"Anab4OICvZ5E9kT4lIsd","level":0,"time":"April 02, 2021 02:34:58","remoteAddr":"","user":"--","app":"files_sharing","method":"","url":"--","message":"/appinfo/app.php is deprecated, use \\OCP\\AppFramework\\Bootstrap\\IBootstrap on the application class instead.","userAgent":"--","version":"21.0.0.18"}
{"reqId":"Anab4OICvZ5E9kT4lIsd","level":0,"time":"April 02, 2021 02:34:58","remoteAddr":"","user":"--","app":"group_everyone","method":"","url":"--","message":"/appinfo/app.php is deprecated, use \\OCP\\AppFramework\\Bootstrap\\IBootstrap on the application class instead.","userAgent":"--","version":"21.0.0.18"}
{"reqId":"Anab4OICvZ5E9kT4lIsd","level":0,"time":"April 02, 2021 02:34:58","remoteAddr":"","user":"--","app":"music","method":"","url":"--","message":"/appinfo/app.php is deprecated, use \\OCP\\AppFramework\\Bootstrap\\IBootstrap on the application class instead.","userAgent":"--","version":"21.0.0.18"}
{"reqId":"Anab4OICvZ5E9kT4lIsd","level":0,"time":"April 02, 2021 02:34:58","remoteAddr":"","user":"--","app":"suspicious_login","method":"","url":"--","message":"/appinfo/app.php is deprecated, use \\OCP\\AppFramework\\Bootstrap\\IBootstrap on the application class instead.","userAgent":"--","version":"21.0.0.18"}

This information does not seem related to the error when trying to access nextcloud though

Apparently apache has been logging all the important stuff