S3 owncloud "Error when combining data blocks, status code 500”

I have connected S3 storage in owncloud. Now I’m trying to copy a 300 MB file there through the browser. After he scored 100%, he gave the message “Error when combining data blocks, status code 500”., the file in the S3 file storage is not displayed.

How can I fix this error?
“Own Cloud”.
I am using version

Thank you for your answers.

I see this error in the logs: “PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 98566176 bytes) in /var/www/owncloud/apps/files_external/3rdparty/guzzlehttp/psr7/src Utils.php on line 91”

I found out that the problem lies in the php memory limit parameter in the /etc/php/7.4/apache2/php.ini file, I increased the memory limit value. Now the error appears when the size of the downloaded file exceeds the value in php memory limit.
I understand correctly that the file is placed in RAM entirely, but in this case I cannot set the memory limit value larger than the file size (it may exceed the available amount of RAM), how can I avoid this? How to set up caching correctly?

has anyone solved the problem with uploading large files to S3 external storage?

I do not observe such a problem in nextcloud, the php.ini parameters are identical