Error while loading the file data

Nextcloud version: 18.0.4
Operating system and version: CentOS 7 3.10.0-1160.24.1.el7.x86_64
Apache version: 2.4.6
PHP version: 7.2.231
MySQL: 5.7.27

I manage a multi-tenancy environment and randomly, only for one tenant during sharing any element, in the sidebar appears the error: “Error while loading the file data”.
If you try after some second, it could be working but not for another resource. It’s really random.
error_loading_data

Steps to replicate it:

  1. Access to tenant
  2. Click on share button

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

No errors

I attach the browser console error.

Other tenants (same version, same environment) didn’t have this issue.

Any ideas on why this happens or how to fix it?

Thanks in advance

Sorry i can not really help you. But can you explain your settings? Do you use a reverse proxy e.g. apache2 or nginx? Do you use special modules e.g. mod_evasive, …

Also you use a very old Nextcloud implementation with Nextcloud 18. Can you upgrade?

Thank you for your attention.

No special modules and no reverse proxy.

I can’t upgrade my environment, at the moment, unfortunately.
Here is my config.php (sensitive data are replaced with HIDE):

<?php
$CONFIG = array (
  'instanceid' => 'HIDE',
  'passwordsalt' => 'HIDE',
  'secret' => 'HIDE',
  'versions_retention_obligation' => 'auto',
  'datadirectory' => '/var/www/html/nextcloud/HIDE/data',
  'overwrite.cli.url' => 'HIDE',
  'skeletondirectory' => '',
  'installed' => true,
  'loglevel' => 2,
  'logfile' => '/var/log/nextcloud/nextcloud_HIDE.log',
  'log_rotate_size' => '104857600',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'memcache.distributed' => '\\OC\\Memcache\\Redis',
  'memcache.local' => '\\OC\\Memcache\\Redis',
  'redis' =>
  array (
    'host' => 'localhost',
    'port' => 6379,
    'timeout' => 3,
  ),
  'maintenance' => false,
  'theme' => '',
  'mail_from_address' => 'noreply',
  'mail_smtpmode' => 'smtp',
  'mail_sendmailmode' => 'smtp',
  'mail_domain' => 'HIDE',
  'mail_smtphost' => 'HIDE',
  'preview_max_filesize_image' => 100,
  'enabledPreviewProviders' =>
  array (
    0 => 'OC\\Preview\\Image',
    1 => 'OC\\Preview\\TXT',
    2 => 'OC\\Preview\\PDF',
    3 => 'OC\\Preview\\Movie',
    4 => 'OC\\Preview\\TIFF',
    5 => 'OC\\Preview\\SVG',
    6 => 'OC\\Preview\\MKV',
    7 => 'OC\\Preview\\MP4',
    8 => 'OC\\Preview\\AVI',
    9 => 'OC\\Preview\\MOV',
    10 => 'OC\\Preview\\TIF',
  ),
  'trusted_domains' =>
  array (
    0 => 'HIDE',
  ),
  'dbtype' => 'mysql',
  'version' => '18.0.4.2',
  'dbname' => 'HIDE',
  'dbhost' => 'HIDE',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'HIDE',
  'dbpassword' => 'HIDE',
  'updater.release.channel' => 'stable',
  'mail_smtpport' => '25',
);

Perhaps it is a problem of Redis. Perhaps you can change the redis settings:

If you want to connect to Redis configured to listen on an Unix socket (which is recommended if Redis is running on the same system as Nextcloud) use this example config.php configuration:

'memcache.local' => '\OC\Memcache\APCu',
'memcache.distributed' => '\OC\Memcache\Redis',
'redis' => [
     'host'     => '/run/redis/redis-server.sock',
     'port'     => 0,
     'dbindex'  => 0,
     'password' => 'secret',
     'timeout'  => 1.5,
],

dokumentation Redis

Sorry i do not use Redis.
Maybe you also can switch to APCu.

I’m also getting the message " Error while loading the file data" when trying to load the historic version of a file in the web browser interface. No idea why.

I tried this but did not solve my issue, unfortunately. Error in the subject still persists.
Is there another attempt I could try?
Thanks in advance.