Command line allowed memory exhausted

Hello all,

I’m running into an issue I can not resolve since a couple of days, I’m pretty much a nextcloud newb and far away from being a linux/docker expert, but I’ve got basic knowledge about this and I know how to google. :slight_smile: This issue is specific to my machine (it seems) since I’m using a pre made container and no one else has this issue, eventhough I’m using it withoug any modifications (tried some in order to fix the issue, but nothing helped). I’m hoping someone here in this community can help me debugg the issue and pinpoint the cause for this.

Nextcloud version (eg, 20.0.5): 22.2.0
Operating system and version (eg, Ubuntu 20.04): docker container iamklaus/nextcloud Host: unraid 6.9.2
Apache or nginx version (eg, Apache 2.4.25): don't know how to find out
PHP version (eg, 7.4): 8.0.11

The issue:
running OCC command (e.g. sudo -u www-data php occ face:setup -m 1) results in error:
Fatal error: Allowed memory size of 2097152 bytes exhausted (tried to allocate 446464 bytes) in /var/www/html/3rdparty/composer/autoload_real.php on line 37
I reported this against the container as well, but it seems no one else has this issue, so it somehow must be me.

Is this the first time you’ve seen this error? (Y/N): No

Steps to replicate it:

  1. Install container iamklaus/nextcloud
  2. run OCC command (Issue happens, even if setting ‘PHP_MEMORY_LIMIT’ to ‘4G’)

checks I already made:

  1. increase PHP Memory limit source for this idea github SuperSandro2000: php -i reports $_ENV['PHP_MEMORY_LIMIT'] => 4G
  2. check if ‘apc.enable_cli=1’ source for this idea github Nowaker: php -i reports APCu Support => Enabled
  3. run other occ commands (even without anything behind occ), will result in same issue.

output of Nextcloud log from Admin > Logging:
link

config.php file:

<?php
$CONFIG = array (
  'htaccess.RewriteBase' => '/',
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'apps_paths' => 
  array (
    0 => 
    array (
      'path' => '/var/www/html/apps',
      'url' => '/apps',
      'writable' => false,
    ),
    1 => 
    array (
      'path' => '/var/www/html/custom_apps',
      'url' => '/custom_apps',
      'writable' => true,
    ),
  ),
  'instanceid' => '...',
  'passwordsalt' => '...',
  'secret' => '...',
  'trusted_domains' => 
  array (
    0 => '...',
  ),
  'datadirectory' => '/var/www/html/data',
  'dbtype' => 'mysql',
  'version' => '22.2.0.2',
  'overwrite.cli.url' => '...',
  'dbname' => 'nextcloud',
  'dbhost' => '192.168.1.11:3306',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'nextcloud',
  'dbpassword' => '....',
  'installed' => true,
  'loglevel' => 2,
  'maintenance' => false,
);

The output of your Apache/nginx/system log in /var/log/____:
can not open “access.log error.log other_vhosts_access.log” or in /var/log/apache2/

pastebin of php -i