Maintenance mode after PHP memory exhausted

Install switch to maintenance mode and report PHP memory exhausted
I opened a Github issue and I got the suggestion to write here

Steps to reproduce

  1. Deployed by DigitalOcean marketplace
  2. Upload a file of 1 GB
  3. Exhaustion in /var/lib/docker/volumes/nextcloud_aio_nextcloud/_data/data/nextcloud.log
    {"reqId":"Ekx1b4vlVyT9t9QlICY4","level":3,"time":"2022-08-10T00:01:47+00:00","remoteAddr":"","user":"--","app":"PHP","method":"","url":"--","message":"Allowed memory size of 536870912 bytes exhausted (tried to allocate 400564224 bytes) at /var/www/html/3rdparty/guzzlehttp/psr7/src/Stream.php#247","userAgent":"--","version":"","data":{"app":"PHP"}}
  4. Interface show Errore durante l'assemblaggio dei blocchi, codice di stato 500

Host OS

  • Ubuntu 20.04.4 LTS
  • Docker version 20.10.17, build 100c701
  • Docker images
    # docker images
    REPOSITORY                  TAG       IMAGE ID       CREATED        SIZE
    nextcloud/aio-nextcloud     latest    b73fc7d592a8   12 days ago    1.13GB
    nextcloud/all-in-one        latest    179703f14c67   12 days ago    688MB
    nextcloud/aio-talk          latest    b1f702716475   12 days ago    494MB
    nextcloud/aio-collabora     latest    7e015eb19abe   12 days ago    1.53GB
    nextcloud/aio-apache        latest    1450639e0b5d   12 days ago    262MB
    nextcloud/aio-redis         latest    0b765682118c   12 days ago    28.4MB
    nextcloud/aio-watchtower    latest    07f93392c805   12 days ago    23.3MB
    nextcloud/aio-postgresql    latest    7be223dfd807   12 days ago    220MB
    nextcloud/aio-borgbackup    latest    8ccd87cf4986   12 days ago    116MB
    nextcloud/aio-domaincheck   latest    7030bbf08ea9   3 months ago   12.2MB

Nextcloud AIO version

Nextcloud AIO v1.7.1

Current channel


Other valuable info

  • DigitalOcean Object storage

     array (
         'class' => '\\OC\\Files\\ObjectStore\\S3',
         'arguments' => 
         array (
           'bucket' => '',
           'key' => '',
           'secret' => '',
           'hostname' => '',
           'region' => 'ams3',
           'port' => 443,
           'use_ssl' => true,
           'use_path_style' => true,

The 512 MB is a minimum requirement. It can a bit tricky, perhaps reduce the number of apps that you are using. With object storage, you also add an additional layer (files are not just written to disk, it needs to be cached streamed to the object storage, not sure if that is the actual part that required more memory: 3rdparty/guzzlehttp/psr7/src/Stream.php#247).

Yes, 1GB of RAM is certainly too less for AIO. Please update your Linode instance to at least 2GB RAM and disable all optional containers which will make it work properly. If you want to use any of the optional containers you should have 3GB RAM to make it work properly. If you want to enable ClamAV, you will need 4GB RAM.

As a general recommendation: just have a look at the minimal requirements that are stated for the optional addons in the AIO interface.