Error when uploading big file after "big file ulpoad" configuration

Nextcloud version: 24.0.7
Operating system and version : Ubuntu 22.04 LTS
Apache or nginx version : Apache/2.4.52 (Ubuntu)
PHP version : PHP 8.1.2-1ubuntu2.9

I followed the big file upload documentation page: https://docs.nextcloud.com/server/latest/admin_manual/configuration_files/big_file_upload_configuration.html

Namely:

  • added in var/www/html/.htaccess
# PHP 8+
<IfModule mod_php.c>
  php_value mbstring.func_overload 0
  php_value default_charset 'UTF-8'
  php_value output_buffering 0
  php_value upload_max_filesize 50G
  php_value post_max_size 50G
  php_value max_input_time 3600
  php_value max_execution_time 3600
  <IfModule mod_env.c>
    SetEnv htaccessWorking true
  </IfModule>
</IfModule>
  • added in var/www/html/.user.ini:
php_value upload_max_filesize 50G
php_value post_max_size 50G
php_value max_input_time 3600
php_value max_execution_time 3600
  • In /var/www/html/config/config.php:

modified the temp folder to have enough space by adding:

'tempdirectory' => '/var/www/html/data/temp/',
  • changed chunk file to 20MB in Nextcloud:
sudo -u www-data php occ config:app:set files max_chunk_size --value 20971520

(not modified:
Apache
LimitRequestBody
SSLRenegBufferSize
Timeout
)

I tried to ulpload a 1GB or 3GB file and I have this error:

Allowed memory size of 134217728 bytes exhausted (tried to allocate 81788960 bytes) at /var/www/html/3rdparty/guzzlehttp/psr7/src/Stream.php#247

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

[Wed Jan 11 14:26:18.460650 2023] [php:error] [pid 648113] [client 188.62.25.232:56863] PHP Fatal error:  Allowed memory size of 134217728 bytes exhausted (tried to allocate 65011744 bytes) in /var/www/html/3rdparty/guzzlehttp/psr7/src/Stream.php on line 247
[Wed Jan 11 14:26:18.486268 2023] [php:error] [pid 648113] [client 188.62.25.232:56863] PHP Fatal error:  Uncaught Error: Class "OCP\\Files\\Cache\\CacheEntryUpdatedEvent" not found in /var/www/html/lib/private/Files/Cache/Cache.php:418\nStack trace:\n#0 /var/www/html/lib/private/Files/ObjectStore/ObjectStoreStorage.php(487): OC\\Files\\Cache\\Cache->update()\n#1 [internal function]: OC\\Files\\ObjectStore\\ObjectStoreStorage->OC\\Files\\ObjectStore\\{closure}()\n#2 /var/www/html/3rdparty/icewind/streams/src/CountWrapper.php(100): call_user_func()\n#3 [internal function]: Icewind\\Streams\\CountWrapper->stream_close()\n#4 {main}\n  thrown in /var/www/html/lib/private/Files/Cache/Cache.php on line 418
[Wed Jan 11 15:53:46.414047 2023] [php:error] [pid 655118] [client 188.62.25.232:62296] PHP Fatal error:  Allowed memory size of 134217728 bytes exhausted (tried to allocate 94371872 bytes) in /var/www/html/3rdparty/guzzlehttp/psr7/src/Stream.php on line 247
[Wed Jan 11 15:53:46.438177 2023] [php:error] [pid 655118] [client 188.62.25.232:62296] PHP Fatal error:  Uncaught Error: Class "OCP\\Files\\Cache\\CacheEntryUpdatedEvent" not found in /var/www/html/lib/private/Files/Cache/Cache.php:418\nStack trace:\n#0 /var/www/html/lib/private/Files/ObjectStore/ObjectStoreStorage.php(487): OC\\Files\\Cache\\Cache->update()\n#1 [internal function]: OC\\Files\\ObjectStore\\ObjectStoreStorage->OC\\Files\\ObjectStore\\{closure}()\n#2 /var/www/html/3rdparty/icewind/streams/src/CountWrapper.php(100): call_user_func()\n#3 [internal function]: Icewind\\Streams\\CountWrapper->stream_close()\n#4 {main}\n  thrown in /var/www/html/lib/private/Files/Cache/Cache.php on line 418

Thank you in advance for your help.

Nobody experienced the same difficulties?
Any help is appreciated…