PHP Fatal error: Allowed memory size of 2097152 bytes exhausted (tried to allocate 4096 bytes) in /var/www/nextcloud/3rdparty/composer/autoload_static.php on line 2530

Hey,

I have a problem since this morning.

Sorry to hear you’re facing problems :slightly_frowning_face:

help.nextcloud.com is for home/non-enterprise users. If you’re running a business, paid support can be accessed via portal.nextcloud.com where we can ensure your business keeps running smoothly.

In order to help you as quickly as possible, before clicking Create Topic please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:

example

Or for longer, use three backticks above and below the code snippet:

longer
example
here

Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can :heart:

Nextcloud version (eg, 20.0.5): 21.0.1
Operating system and version (eg, Ubuntu 20.04): debian 10
Apache or nginx version (eg, Apache 2.4.25): nginx 1.20
PHP version (eg, 7.4): 8.0.3

The issue you are facing:

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

Steps to replicate it:

sudo -u www-data php -f /var/www/nextcloud/cron.php
PHP Fatal error: Allowed memory size of 2097152 bytes exhausted (tried to allocate 4096 bytes) in /var/www/nextcloud/3rdparty/composer/autoload_static.php on line 2530

The output of your Nextcloud log in Admin > Logging:

PASTE HERE

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

  'passwordsalt' => 'SENSITIVE DATE REMOVED BY MOD [JK]',
  'secret' => 'SENSITIVE DATE REMOVED BY MOD [JK]',
  'trusted_domains' =>
  array (
    0 => 'SENSITIVE DATE REMOVED BY MOD [JK]',
    1 => 'SENSITIVE DATE REMOVED BY MOD [JK]',
  ),
  'datadirectory' => '/home/data',
  'dbtype' => 'mysql',
  'version' => '21.0.1.1',
  'overwrite.cli.url' => 'https://xxx.xxx-xx.fr',
  'dbname' => 'xxxx',
  'dbhost' => 'localhost',
  'default_langage' => 'fr',
  'allow_user_to_change_display_name' => false,
  'appstoreenabled' => true,
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'xxxx',
  'dbpassword' => 'xxx',
  'installed' => true,
  'instanceid' => 'SENSITIVE DATE REMOVED BY MOD [JK]',
  'default_phone_region' => 'FR',
  'activity_expire_days' => 365,
  'activity_use_cached_mountpoints' => true,
  'auth.bruteforce.protection.enabled' => true,
  'blacklisted_files' =>
  array (
    0 => '.htaccess',
    1 => 'Thumbs.db',
    2 => 'thumbs.db',
  ),
  'cron_log' => true,
  'enable_previews' => true,
  'enabledPreviewProviders' =>
  array (
    0 => 'OC\\Preview\\PNG',
    1 => 'OC\\Preview\\JPEG',
    2 => 'OC\\Preview\\GIF',
    3 => 'OC\\Preview\\BMP',
    4 => 'OC\\Preview\\XBitmap',
    5 => 'OC\\Preview\\Movie',
    6 => 'OC\\Preview\\PDF',
    7 => 'OC\\Preview\\MP3',
    8 => 'OC\\Preview\\TXT',
    9 => 'OC\\Preview\\MarkDown',
  ),
  'filesystem_check_changes' => 0,
  'filelocking.enabled' => 'true',
  'htaccess.RewriteBase' => '/',
  'integrity.check.disabled' => false,
  'knowledgebaseenabled' => false,
  'log_rotate_size' => 104857600,
  'logfile' => '/home/data/nextcloud.log',
  'logtimezone' => 'Europe/Berlin',

The output of your Apache/nginx/system log in /var/log/____:

PASTE HERE

@Julien-59810

Salut Julien and welcome to the user-forum of NC.

Thanks for your very first contribution here… You even filled in some important details.

Buuuuuut maybe it was too much details :wink: So I removed several sensitive data from your posting. Though you should regard your instance as being compromised, I’m afraid.

By just watching the threadtitle I can remember that there has been several threads about similar issues on this forum already. Did you check them oit already (as this forum consists of a built-in seacrh function marked by a :mag: in the upper right menu-bar :wink: )

good luck

Hi @Julien-59810 try this maybe it solve your issue : [SOLVED] Occ command; PHP Fatal error, Allowed memory size of XXX bytes exhausted - #17 by andreasus