Memory size exhausted in ...Blurhash/Listener/GenerateBlurhashMetadata.php on line 102

Support intro

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, 29.0.5): 30.0.1
Operating system and version (eg, Ubuntu 24.04): Synology NAS 7.2.2
Apache or nginx version (eg, Apache 2.4.25): replace me
PHP version (eg, 8.3): 8.2 (latest available on Synology NAS)

The issue you are facing:
I have my NAS setup to execute the nightly cronjob in NextCloud and I get a mail every night like this as a failing result from the job:

Task Scheduler has completed a scheduled task.

Task: NextCloud run Cron job
Start time: Sun, 20 Oct 2024 01:00:01 +0200
Stop time: Sun, 20 Oct 2024 01:00:02 +0200
Current status: 255 (Interrupted)
Standard output/error:
PHP Fatal error:  Allowed memory size of 134217728 bytes exhausted (tried to allocate 28672 bytes) in /volume1/web/nextcloud/lib/private/Blurhash/Listener/GenerateBlurhashMetadata.php on line 85

In Administration->Overview I can see that the last cron job failed.

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

Steps to replicate it:

  1. I occurs every night as described above

Edit: I forgot to write that php memory_limit is set to 1024M. The error message “Allows memory size of 134217728 bytes exhausted” but I have no idea from where this number comes.

The output of your Nextcloud log in Admin > Logging:

[cron] Debug: CLI cron call has selected job OC\FilesMetadata\Job\UpdateSingleMetadata (id: 943, arguments: ["niklas",4870])
	from ? by -- at Oct 19, 2024 at 1:00:02 AM
[cron] Debug: Starting job OC\FilesMetadata\Job\UpdateSingleMetadata (id: 943, arguments: ["niklas",4870])
	from ? by -- at Oct 19, 2024 at 1:00:02 AM
[PHP] Error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 28672 bytes) at /volume1/web/nextcloud/lib/private/Blurhash/Listener/GenerateBlurhashMetadata.php#102
	from ? by -- at Oct 19, 2024 at 1:00:03 AM


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

<?php
$CONFIG = array (
  'instanceid' => '...',
  'passwordsalt' => '...',
  'secret' => '...',
  'trusted_domains' => 
  array (
    0 => '...',
    1 => '...',
  ),
  'datadirectory' => '/volume1/web/nextcloud/data',
  'dbtype' => 'mysql',
  'version' => '29.0.8.1',
  'overwrite.cli.url' => '...',
  'dbname' => '...',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'nc_user',
  'dbpassword' => '...',
  'installed' => true,
  'mail_smtpmode' => 'smtp',
  'mail_smtpsecure' => 'tls',
  'mail_sendmailmode' => 'smtp',
  'mail_from_address' => '...',
  'mail_domain' => '...',
  'mail_smtpauthtype' => 'LOGIN',
  'mail_smtpauth' => 1,
  'mail_smtphost' => '...',
  'mail_smtpport' => '...',
  'mail_smtpname' => '...',
  'mail_smtppassword' => '...',
  'maintenance' => false,
  'default_phone_region' => 'SE',
  'theme' => '',
  'loglevel' => 0,
  'updater.secret' => '...',
);

The output of your Apache/nginx/system log in /var/log/____:
I see nothing in the log for this time at all.

PASTE HERE

Output errors in nextcloud.log in /var/www/ or as admin user in top right menu, filtering for errors. Use a pastebin service if necessary.

PASTE HERE

134217728 / 1024 / 1024 =128MB

Sieht so aus als ob das Memory Limit auf der Kommandozeile nicht ausreichend ist.

Thanks! You helped me in the right direction. I run this command on a cli on the NAS to understand which php.ini that is used:
php --ini
Then I changed memory_limit to 512M in that php.ini and then it works. Thanks!

1 Like

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.