"Internal errors" overwriting start of my local files, corrupted files

Nextcloud version : 19.0.1
Operating system and version: Centos 8 .2004 (Virtualized, Proxmox)
Apache or nginx version:  nginx/1.14.1
PHP version : v7.4.11
HW (guest/host): 
Disk: 200GB / 2x Gigabyte GP-GSM2NE3100TNTD 1TB NVME (ZFS RAID1)
CPU: 4x vcpu cores / Dual Xeon X5690 
Memory: 4GB / 128GB 

The issue you are facing:
Some of my local files got corrupted and it has error overwriting the start of the real file. It seemed to have happened when storage on server was under heavy load. But it is really big bug to have servers internal error to be logged INTO the the LOCAL files of the clouddrive :safety_vest:

Internal Server Error

The server encountered an internal error and was unable to complete your request.
Please contact the server administrator if this error reappears multiple times, please include the technical details below in your report.
More details can be found in the server log.

DATA;
#1=CARTESIAN_POINT('',(7.585786437627E0,0.E0,-4.E0));
#2=DIRECTION('',(0.E0,-1.E0,0.E0));
#3=DIRECTION('',(0.E0,0.E0,-1.E0));
#4=AXIS2_PLACEMENT_3D('',#1,#2,#3);
#6=DIRECTION('',(-1.E0,0.E0,0.E0));
#7=VECTOR('',#6,1.708578643763E1);
<continues>

The file is actually:

ISO-10303-21;
HEADER;
FILE_DESCRIPTION((''),'2;1');
FILE_NAME('XT90_MALE_ASM','2014-08-28T',('Stef'),(''),
'PRO/ENGINEER BY PARAMETRIC TECHNOLOGY CORPORATION, 2013320',
'PRO/ENGINEER BY PARAMETRIC TECHNOLOGY CORPORATION, 2013320','');
FILE_SCHEMA(('CONFIG_CONTROL_DESIGN'));
ENDSEC;
DATA;
#1=CARTESIAN_POINT('',(7.585786437627E0,0.E0,-4.E0));
#2=DIRECTION('',(0.E0,-1.E0,0.E0));
#3=DIRECTION('',(0.E0,0.E0,-1.E0));
#4=AXIS2_PLACEMENT_3D('',#1,#2,#3);
#6=DIRECTION('',(-1.E0,0.E0,0.E0));
<continues>

If it’s a binary file then error is still there and binary follows.

Now i have a situation where I have 279 files corrupted totaling 3.2GB of data.
It does seems that files are fine on server so to be sure one way would be to delete all local files and resync, or manually download all files and place them in appropriate folders which is tedious work.

Is this the first time you’ve seen this error? : Y

I just moved to nextcloud and been using it around 2-3 months now.

The output of your config.php file in:

?php
$CONFIG = array (
  'instanceid' => 'oci0wo7f1pyb',
  'passwordsalt' => '<removed>',
  'secret' => '<removed>',
  'trusted_domains' =>
  array (
    0 => 'cloud.domain',
  ),
  'datadirectory' => '/home/cloud_data',
  'blacklisted_files' => ['blablalbllablalblalba'],
  'dbtype' => 'mysql',
  'version' => '19.0.1.1',
  'overwrite.cli.url' => 'https://<removed>',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'nextcloud',
  'dbpassword' => '',
  'installed' => true,
  'app_install_overwrite' =>
  array (
    0 => 'dropit',
  ),
);

I found the same issue; one user was complaining that she can’t open some excel files. The size of the file is identical with the one on my computer the time stamp the same; I opened both in a comparison tool and found at the beginning of the corrupted file

the original file starts

The file on the server appears fine