How to resolve the problem -> PHP Fatal error: Allowed memory size of 2147483648 bytes exhausted (tried to allocate 262144 bytes) in /var/www/html/apps/files_sharing/lib/Cache.php on line 117

Hi all,

after i upgraded the talk & onlyoffice app,
have only one user get the error that can’t display the file list,
but other users not get the problem

I also check the “nextcloud.log” to get the error

[php:error] [pid 42] [client $MY_CLIENT_IP:54587] PHP Fatal error:  Allowed memory size of 2147483648 bytes exhausted (tried to allocate 262144 bytes) in /var/www/html/apps/files_sharing/lib/Cache.php on line 117
[Mon Jun 03 01:34:45.313330 2024] [php:error] [pid 42] [client $MY_CLIENT_IP:54587] PHP Fatal error:  Allowed memory size of 2147483648 bytes exhausted (tried to allocate 262144 bytes) in Unknown on line 0
$MY_CLIENT_IP - - [03/Jun/2024:01:34:40 +0000] "GET /apps/recommendations/api/recommendations HTTP/1.1" 500 870 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.0.0 Safari/537.36"
[Mon Jun 03 01:34:53.051025 2024] [php:error] [pid 38] [client $MY_CLIENT_IP:54581] PHP Fatal error:  Allowed memory size of 2147483648 bytes exhausted (tried to allocate 262144 bytes) in /var/www/html/apps/files_sharing/lib/SharedStorage.php on line 532
[Mon Jun 03 01:34:53.051359 2024] [php:error] [pid 38] [client $MY_CLIENT_IP:54581] PHP Fatal error:  Allowed memory size of 2147483648 bytes exhausted (tried to allocate 262144 bytes) in /var/www/html/lib/private/Log/ErrorHandler.php on line 56

AND I try the occ cmd to repair are not success.
HERE:

occ maintenance:mode --on
occ maintenance:repair
occ mainenance:mode --off
occ files:clean
occ files:scan --all -> **fail**
occ files:scan $THE_PROLEM_USER_ACCOUNT -> **fail**

AND I discovered somethine,
when I disable the deck & talk app, the file list is display

nextcloud version : 27.0.1(Docker)
talk app version: 17.1.1

Have someone resolve the problem or have solution ??
thanks.

You may want to start with running a supported version.You’re running a very very old release. The still supported v27 is 27.1.10.

That log looks like your Apache or web server error log, not the Nextcloud log. While useful, the Nextcloud log itself is called nextcloud.log and located in your datadirectory (at least by default).

When you return after updating, please also post your config and which Docker image (there are multiple images).

2 Likes

Hi @jtr,
thank you for your advice.

here is the nextcloud.log, i grep the

{"reqId":"lUvgl0gN3T345nszjwGL","level":3,"time":"2024-06-03T07:42:15+00:00","remoteAddr":"$REMOTE_IP","user":"$LDAP_USER","app":"no app in context","method":"GET","url":"/apps/dashboard/","message":"Dashboard widget user_status took 1.85 seconds to load.","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.0.0 Safari/537.36","version":"27.0.1.2","data":[]}

here is the web network log

Failed to load resource:theserver responded with a status of500()
/remote.php/dav/files/$USER_ID/:1

Here is my config

<?php
$CONFIG = array (
  'htaccess.RewriteBase' => '/',
  'memcache.local' => '\OC\Memcache\APCu',
  'memcache.distributed' => '\OC\Memcache\Redis',
  'memcache.locking' => '\OC\Memcache\Redis',
  'redis.cluster' => [
    'seeds' => [ 
       '$REDIS_CLUSTER_IP:7001',
       '$REDIS_CLUSTER_IP:7002',
       '$REDIS_CLUSTER_IP:7003',
       '$REDIS_CLUSTER_IP:7004',
       '$REDIS_CLUSTER_IP:7005',
       '$REDIS_CLUSTER_IP:7006',
    ],
 ],
  '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' => '$my_instanceid',
  'passwordsalt' => '$my_passwordsalt',
  'secret' => '$my_secret',
  'trusted_domains' =>
  array (
    0 => '$MY_NGINX_IP'
  ),
  'lost_password_link' => 'disabled',
  'dbtype' => 'mysql',
  'version' => '27.0.1.2',
  'overwriteprotocol' => 'https',
  'overwritehost' => '$MY_DOMAIN',
  'overwrite.cli.url' => '$MY_HTTPS_DOMAIN',
  'dbname' => '$MYDB_NAME',
  'dbhost' => '$MYDB_HOST',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => '$MYDB_USER',
  'dbpassword' => '$MYDB_PW',
  'installed' => true,
  'auth.bruteforce.protection.enabled' => false,
  'mail_from_address' => '$SMTP_IP',
  'mail_smtpmode' => 'smtp',
  'mail_sendmailmode' => 'smtp',
  'mail_domain' => '$SMTP_DN',
  'mail_smtphost' => '$SMTP_HOST',
  'mail_smtpport' => '25',
  'auth.webauthn.enabled' => false,
  'trashbin_retention_obligation' => 'auto, 14',
  'loglevel' => 3,
  'maintenance' => false,
  'allow_local_remote_servers' => true,
  'mail_smtpstreamoptions' =>
  array (
    'ssl' =>
    array (
      'allow_self_signed' => true,
      'verify_peer' => false,
      'verify_peer_name' => false,
    ),
  ),
);

by the way,
I trying the newest occ cmd to repair, but i click the y/n chance to late when the scan over…
so i rescan now…
if i success or not, i will upgrade the post again.

./occ maintenance:repair-share-owner

thanks

Update.
It’s OK that used occ cmd to resolve the problem.

./occ maintenance:repair-share-owner