Cannot upload big files >10 GB

I am using docker image nextcloud:fpm with nginx behind a caddy reverse proxy on a debian server.

I want to upload files up to 50 GB. Therefor I have updated the caddy and nginx configuration and the php upload limit. But this is not sucessfull. So far I was only able to successfully upload a file with 10.7 GB. A file with 13 GB already fails.

In that case the upload process seems to run fine till the end and the it errors out:

What am I missing here?

config files:

docker-compose.yaml
with PHP_UPLOAD_LIMIT=50000M

╰─# cat docker-compose.yaml
services:
  db:
    image: mariadb:10.11
    restart: always
    command: --transaction-isolation=READ-COMMITTED --log-bin=binlog --binlog-format=ROW
    volumes:
      - db:/var/lib/mysql
    environment:
      - MYSQL_ROOT_PASSWORD=xxxx
      - MYSQL_PASSWORD=xxxx
      - MYSQL_DATABASE=yyyy
      - MYSQL_USER=yyyy
      - 
  redis:
    image: redis:alpine
    restart: always

  app:
    image: nextcloud:fpm
    restart: always
    depends_on:
      - redis
      - db
    volumes:
      - nextcloud:/var/www/html
    environment:
      - MYSQL_PASSWORD=xxxx
      - MYSQL_DATABASE=nextcloud
      - MYSQL_USER=yyyy
      - MYSQL_HOST=db
      - REDIS_HOST=redis
      - PHP_MEMORY_LIMIT=4096M
      - PHP_UPLOAD_LIMIT=50000M

  cron:
    image: nextcloud:fpm
    restart: always
    volumes:
      - nextcloud:/var/www/html
    entrypoint: /cron.sh
    depends_on:
      - db
      - redis

  web:
    image: nginx
    restart: always
    ports:
      - 8080:80
    depends_on:
      - app
    volumes:
      - ./nginx.conf:/etc/nginx/nginx.conf:ro
    volumes_from:
      - app

volumes:
  nextcloud:
  db:

./nginx.conf

In ./nginx.conf I am using:

client_max_body_size 50G;
client_body_timeout 1200s;

/etc/caddy/Caddyfile
with max_size 50G

╰─# cat /etc/caddy/Caddyfile
my-domain:443 {
        reverse_proxy localhost:8080
        encode zstd gzip
        file_server
        request_body {
	       max_size 50G
	    }

        # https://caddy.community/t/caddy-v2-configuration-nextcloud-docker-php-fpm-with-rules-from-htaccess/20662

        redir /.well-known/carddav /remote.php/dav 301
        redir /.well-known/caldav  /remote.php/dav 301
        redir /.well-known/* /index.php{uri} 301 # Nextcloud front-controller handles routes to /.well-known
        redir /remote/* /remote.php{uri} 301

        php_fastcgi 127.0.0.1:9000 {
                env front_controller_active true
        }

        # Required for legacy
        @notlegacy {
                path *.php *.php/
                not path /index*
                not path /remote*
                not path /public*
                not path /cron*
                not path /core/ajax/update*
                not path /status*
                not path /ocs/v1*
                not path /ocs/v2*
                not path /updater/*
                not path /ocs-provider/*
                not path */richdocumentscode/proxy*
        }
        rewrite @notlegacy /index.php{uri}

        # .htaccess / data / config / ... shouldn't be accessible from outside
        @forbidden {
                path /.htaccess
                path /data/*
                path /config/*
                path /db_structure
                path /.xml
                path /README
                path /3rdparty/*
                path /lib/*
                path /templates/*
                path /occ
                path /console.php
        }

        respond @forbidden 404

}

There is also the post_max_size for php:
https://docs.nextcloud.com/server/latest/admin_manual/configuration_files/big_file_upload_configuration.html

Ideally, you manage to find something in the logs if it is your proxy, nginx or php that is limiting the upload.

How are you uploading? From the Web UI? Via one of the official clients? Via something else?

Also please post the actual full raw log entry. We need the stack trace.

And it would also be helpful if you checked your browser inspector.

These items were all noted in the support template, which perhaps you overlooked? :wink:

PHP_UPLOAD_LIMIT in the image already sets both post_max_size and upload_max_filesize simultaneously.

Sorry, I didnt know about the support template.

We trigger the upload always witht the web gui (New → upload files)

These are the containers that are running.

╰─# docker container ls 
CONTAINER ID   IMAGE           COMMAND                  CREATED       STATUS       PORTS                                     NAMES
d1e0e6d54186   nginx           "/docker-entrypoint.…"   7 hours ago   Up 7 hours   0.0.0.0:8080->80/tcp, [::]:8080->80/tcp   nextcloud-web-1
5d1b3d959ccf   nextcloud:fpm   "/cron.sh"               7 hours ago   Up 7 hours   9000/tcp                                  nextcloud-cron-1
6291f46105d1   nextcloud:fpm   "/entrypoint.sh php-…"   7 hours ago   Up 7 hours   9000/tcp                                  nextcloud-app-1
128dd5d4741a   redis:alpine    "docker-entrypoint.s…"   7 hours ago   Up 7 hours   6379/tcp                                  nextcloud-redis-1
4c73eafbd987   mariadb:10.11   "docker-entrypoint.s…"   7 hours ago   Up 7 hours   3306/tcp                                  nextcloud-db-1

Here are the relavant nextcloud.log entries for a failed upload attempt of file test-13GB.mkv

{"reqId":"YHBGRnWKvF9uQ3MDJXt1","level":1,"time":"2025-01-13T16:08:07+00:00","remoteAddr":"91.41.200.254","user":"matthias","app":"text","method":"PUT","url":"/apps/text/session/451078/create","message":"Create new document of 451078","userAgent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36","version":"30.0.4.1","data":{"app":"text"}}
{"reqId":"CHeP2xBVvfAU7Z8B6z9e","level":2,"time":"2025-01-13T16:13:09+00:00","remoteAddr":"91.41.200.254","user":"matthias","app":"no app in context","method":"PUT","url":"/remote.php/dav/uploads/matthias/web-file-upload-fca6d1e8206a17a3/850","message":"Error while updating parent storage_mtime, should be safe to ignore","userAgent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36","version":"30.0.4.1","exception":{"Exception":"Doctrine\\DBAL\\Exception\\DeadlockException","Message":"An exception occurred while executing a query: SQLSTATE[40001]: Serialization failure: 1213 Deadlock found when trying to get lock; try restarting transaction","Code":1213,"Trace":[{"file":"/var/www/html/3rdparty/doctrine/dbal/src/Connection.php","line":1939,"function":"convert","class":"Doctrine\\DBAL\\Driver\\API\\MySQL\\ExceptionConverter","type":"->","args":[{"__class__":"Doctrine\\DBAL\\Driver\\PDO\\Exception"},{"__class__":"Doctrine\\DBAL\\Query"}]},{"file":"/var/www/html/3rdparty/doctrine/dbal/src/Connection.php","line":1881,"function":"handleDriverException","class":"Doctrine\\DBAL\\Connection","type":"->","args":[{"__class__":"Doctrine\\DBAL\\Driver\\PDO\\Exception"},{"__class__":"Doctrine\\DBAL\\Query"}]},{"file":"/var/www/html/3rdparty/doctrine/dbal/src/Connection.php","line":1213,"function":"convertExceptionDuringQuery","class":"Doctrine\\DBAL\\Connection","type":"->","args":[{"__class__":"Doctrine\\DBAL\\Driver\\PDO\\Exception"},"UPDATE `oc_filecache` SET `mtime` = ?, `storage_mtime` = ? WHERE (`fileid` = ?) AND (`storage` = ?) AND (((`mtime` <> ?) OR (`mtime` IS NULL)) OR ((`storage_mtime` <> ?) OR (`storage_mtime` IS NULL)))",[1736784789,1736784789,"*** sensitive parameters replaced ***",8,1736784789,"And 1 more entries, set log level to debug to see all entries"],[2,2,1,1,2,"And 1 more entries, set log level to debug to see all entries"]]},{"file":"/var/www/html/3rdparty/doctrine/dbal/src/Connections/PrimaryReadReplicaConnection.php","line":292,"function":"executeStatement","class":"Doctrine\\DBAL\\Connection","type":"->","args":["UPDATE `oc_filecache` SET `mtime` = ?, `storage_mtime` = ? WHERE (`fileid` = ?) AND (`storage` = ?) AND (((`mtime` <> ?) OR (`mtime` IS NULL)) OR ((`storage_mtime` <> ?) OR (`storage_mtime` IS NULL)))",[1736784789,1736784789,"*** sensitive parameters replaced ***",8,1736784789,"And 1 more entries, set log level to debug to see all entries"],[2,2,1,1,2,"And 1 more entries, set log level to debug to see all entries"]]},{"file":"/var/www/html/lib/private/DB/Connection.php","line":462,"function":"executeStatement","class":"Doctrine\\DBAL\\Connections\\PrimaryReadReplicaConnection","type":"->","args":["UPDATE `oc_filecache` SET `mtime` = :dcValue5, `storage_mtime` = :dcValue6 WHERE (`fileid` = :dcValue1) AND (`storage` = :dcValue2) AND (((`mtime` <> :dcValue3) OR (`mtime` IS NULL)) OR ((`storage_mtime` <> :dcValue4) OR (`storage_mtime` IS NULL)))",{"dcValue1":"*** sensitive parameters replaced ***","dcValue2":8,"dcValue3":1736784789,"dcValue4":1736784789,"dcValue5":1736784789,"0":"And 1 more entries, set log level to debug to see all entries"},{"dcValue1":1,"dcValue2":1,"dcValue3":2,"dcValue4":2,"dcValue5":2,"0":"And 1 more entries, set log level to debug to see all entries"}]},{"file":"/var/www/html/lib/private/DB/ConnectionAdapter.php","line":67,"function":"executeStatement","class":"OC\\DB\\Connection","type":"->","args":["UPDATE `oc_filecache` SET `mtime` = :dcValue5, `storage_mtime` = :dcValue6 WHERE (`fileid` = :dcValue1) AND (`storage` = :dcValue2) AND (((`mtime` <> :dcValue3) OR (`mtime` IS NULL)) OR ((`storage_mtime` <> :dcValue4) OR (`storage_mtime` IS NULL)))",{"dcValue1":"*** sensitive parameters replaced ***","dcValue2":8,"dcValue3":1736784789,"dcValue4":1736784789,"dcValue5":1736784789,"0":"And 1 more entries, set log level to debug to see all entries"},{"dcValue1":1,"dcValue2":1,"dcValue3":2,"dcValue4":2,"dcValue5":2,"0":"And 1 more entries, set log level to debug to see all entries"}]},{"file":"/var/www/html/lib/private/DB/QueryBuilder/QueryBuilder.php","line":306,"function":"executeStatement","class":"OC\\DB\\ConnectionAdapter","type":"->","args":["UPDATE `*PREFIX*filecache` SET `mtime` = :dcValue5, `storage_mtime` = :dcValue6 WHERE (`fileid` = :dcValue1) AND (`storage` = :dcValue2) AND (((`mtime` <> :dcValue3) OR (`mtime` IS NULL)) OR ((`storage_mtime` <> :dcValue4) OR (`storage_mtime` IS NULL)))",{"dcValue1":"*** sensitive parameters replaced ***","dcValue2":8,"dcValue3":1736784789,"dcValue4":1736784789,"dcValue5":1736784789,"0":"And 1 more entries, set log level to debug to see all entries"},{"dcValue1":1,"dcValue2":1,"dcValue3":2,"dcValue4":2,"dcValue5":2,"0":"And 1 more entries, set log level to debug to see all entries"}]},{"file":"/var/www/html/lib/private/DB/QueryBuilder/ExtendedQueryBuilder.php","line":289,"function":"executeStatement","class":"OC\\DB\\QueryBuilder\\QueryBuilder","type":"->","args":[{"__class__":"OC\\DB\\ConnectionAdapter"}]},{"file":"/var/www/html/lib/private/DB/QueryBuilder/ExtendedQueryBuilder.php","line":55,"function":"executeStatement","class":"OC\\DB\\QueryBuilder\\ExtendedQueryBuilder","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/lib/private/Files/Cache/Cache.php","line":358,"function":"execute","class":"OC\\DB\\QueryBuilder\\ExtendedQueryBuilder","type":"->","args":[]},{"file":"/var/www/html/lib/private/Files/Cache/Updater.php","line":244,"function":"update","class":"OC\\Files\\Cache\\Cache","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/lib/private/Files/Cache/Updater.php","line":125,"function":"correctParentStorageMtime","class":"OC\\Files\\Cache\\Updater","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/apps/dav/lib/Connector/Sabre/File.php","line":330,"function":"update","class":"OC\\Files\\Cache\\Updater","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/apps/dav/lib/Connector/Sabre/Directory.php","line":110,"function":"put","class":"OCA\\DAV\\Connector\\Sabre\\File","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/apps/dav/lib/Upload/UploadFolder.php","line":34,"function":"createFile","class":"OCA\\DAV\\Connector\\Sabre\\Directory","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php","line":1098,"function":"createFile","class":"OCA\\DAV\\Upload\\UploadFolder","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/3rdparty/sabre/dav/lib/DAV/CorePlugin.php","line":504,"function":"createFile","class":"Sabre\\DAV\\Server","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/3rdparty/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"httpPut","class":"Sabre\\DAV\\CorePlugin","type":"->","args":[{"__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]},{"file":"/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php","line":472,"function":"emit","class":"Sabre\\DAV\\Server","type":"->","args":["method:PUT",[{"__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]]},{"file":"/var/www/html/apps/dav/lib/Connector/Sabre/Server.php","line":43,"function":"invokeMethod","class":"Sabre\\DAV\\Server","type":"->","args":[{"__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]},{"file":"/var/www/html/apps/dav/lib/Server.php","line":371,"function":"start","class":"OCA\\DAV\\Connector\\Sabre\\Server","type":"->","args":[]},{"file":"/var/www/html/apps/dav/appinfo/v2/remote.php","line":19,"function":"exec","class":"OCA\\DAV\\Server","type":"->","args":[]},{"file":"/var/www/html/remote.php","line":146,"args":["/var/www/html/apps/dav/appinfo/v2/remote.php"],"function":"require_once"}],"File":"/var/www/html/3rdparty/doctrine/dbal/src/Driver/API/MySQL/ExceptionConverter.php","Line":39,"Previous":{"Exception":"Doctrine\\DBAL\\Driver\\PDO\\Exception","Message":"SQLSTATE[40001]: Serialization failure: 1213 Deadlock found when trying to get lock; try restarting transaction","Code":1213,"Trace":[{"file":"/var/www/html/3rdparty/doctrine/dbal/src/Driver/PDO/Statement.php","line":132,"function":"new","class":"Doctrine\\DBAL\\Driver\\PDO\\Exception","type":"::","args":[{"__class__":"PDOException","errorInfo":["40001",1213,"Deadlock found when trying to get lock; try restarting transaction"]}]},{"file":"/var/www/html/3rdparty/doctrine/dbal/src/Connection.php","line":1207,"function":"execute","class":"Doctrine\\DBAL\\Driver\\PDO\\Statement","type":"->","args":[]},{"file":"/var/www/html/3rdparty/doctrine/dbal/src/Connections/PrimaryReadReplicaConnection.php","line":292,"function":"executeStatement","class":"Doctrine\\DBAL\\Connection","type":"->","args":["UPDATE `oc_filecache` SET `mtime` = ?, `storage_mtime` = ? WHERE (`fileid` = ?) AND (`storage` = ?) AND (((`mtime` <> ?) OR (`mtime` IS NULL)) OR ((`storage_mtime` <> ?) OR (`storage_mtime` IS NULL)))",[1736784789,1736784789,"*** sensitive parameters replaced ***",8,1736784789,"And 1 more entries, set log level to debug to see all entries"],[2,2,1,1,2,"And 1 more entries, set log level to debug to see all entries"]]},{"file":"/var/www/html/lib/private/DB/Connection.php","line":462,"function":"executeStatement","class":"Doctrine\\DBAL\\Connections\\PrimaryReadReplicaConnection","type":"->","args":["UPDATE `oc_filecache` SET `mtime` = :dcValue5, `storage_mtime` = :dcValue6 WHERE (`fileid` = :dcValue1) AND (`storage` = :dcValue2) AND (((`mtime` <> :dcValue3) OR (`mtime` IS NULL)) OR ((`storage_mtime` <> :dcValue4) OR (`storage_mtime` IS NULL)))",{"dcValue1":"*** sensitive parameters replaced ***","dcValue2":8,"dcValue3":1736784789,"dcValue4":1736784789,"dcValue5":1736784789,"0":"And 1 more entries, set log level to debug to see all entries"},{"dcValue1":1,"dcValue2":1,"dcValue3":2,"dcValue4":2,"dcValue5":2,"0":"And 1 more entries, set log level to debug to see all entries"}]},{"file":"/var/www/html/lib/private/DB/ConnectionAdapter.php","line":67,"function":"executeStatement","class":"OC\\DB\\Connection","type":"->","args":["UPDATE `oc_filecache` SET `mtime` = :dcValue5, `storage_mtime` = :dcValue6 WHERE (`fileid` = :dcValue1) AND (`storage` = :dcValue2) AND (((`mtime` <> :dcValue3) OR (`mtime` IS NULL)) OR ((`storage_mtime` <> :dcValue4) OR (`storage_mtime` IS NULL)))",{"dcValue1":"*** sensitive parameters replaced ***","dcValue2":8,"dcValue3":1736784789,"dcValue4":1736784789,"dcValue5":1736784789,"0":"And 1 more entries, set log level to debug to see all entries"},{"dcValue1":1,"dcValue2":1,"dcValue3":2,"dcValue4":2,"dcValue5":2,"0":"And 1 more entries, set log level to debug to see all entries"}]},{"file":"/var/www/html/lib/private/DB/QueryBuilder/QueryBuilder.php","line":306,"function":"executeStatement","class":"OC\\DB\\ConnectionAdapter","type":"->","args":["UPDATE `*PREFIX*filecache` SET `mtime` = :dcValue5, `storage_mtime` = :dcValue6 WHERE (`fileid` = :dcValue1) AND (`storage` = :dcValue2) AND (((`mtime` <> :dcValue3) OR (`mtime` IS NULL)) OR ((`storage_mtime` <> :dcValue4) OR (`storage_mtime` IS NULL)))",{"dcValue1":"*** sensitive parameters replaced ***","dcValue2":8,"dcValue3":1736784789,"dcValue4":1736784789,"dcValue5":1736784789,"0":"And 1 more entries, set log level to debug to see all entries"},{"dcValue1":1,"dcValue2":1,"dcValue3":2,"dcValue4":2,"dcValue5":2,"0":"And 1 more entries, set log level to debug to see all entries"}]},{"file":"/var/www/html/lib/private/DB/QueryBuilder/ExtendedQueryBuilder.php","line":289,"function":"executeStatement","class":"OC\\DB\\QueryBuilder\\QueryBuilder","type":"->","args":[{"__class__":"OC\\DB\\ConnectionAdapter"}]},{"file":"/var/www/html/lib/private/DB/QueryBuilder/ExtendedQueryBuilder.php","line":55,"function":"executeStatement","class":"OC\\DB\\QueryBuilder\\ExtendedQueryBuilder","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/lib/private/Files/Cache/Cache.php","line":358,"function":"execute","class":"OC\\DB\\QueryBuilder\\ExtendedQueryBuilder","type":"->","args":[]},{"file":"/var/www/html/lib/private/Files/Cache/Updater.php","line":244,"function":"update","class":"OC\\Files\\Cache\\Cache","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/lib/private/Files/Cache/Updater.php","line":125,"function":"correctParentStorageMtime","class":"OC\\Files\\Cache\\Updater","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/apps/dav/lib/Connector/Sabre/File.php","line":330,"function":"update","class":"OC\\Files\\Cache\\Updater","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/apps/dav/lib/Connector/Sabre/Directory.php","line":110,"function":"put","class":"OCA\\DAV\\Connector\\Sabre\\File","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/apps/dav/lib/Upload/UploadFolder.php","line":34,"function":"createFile","class":"OCA\\DAV\\Connector\\Sabre\\Directory","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php","line":1098,"function":"createFile","class":"OCA\\DAV\\Upload\\UploadFolder","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/3rdparty/sabre/dav/lib/DAV/CorePlugin.php","line":504,"function":"createFile","class":"Sabre\\DAV\\Server","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/3rdparty/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"httpPut","class":"Sabre\\DAV\\CorePlugin","type":"->","args":[{"__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]},{"file":"/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php","line":472,"function":"emit","class":"Sabre\\DAV\\Server","type":"->","args":["method:PUT",[{"__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]]},{"file":"/var/www/html/apps/dav/lib/Connector/Sabre/Server.php","line":43,"function":"invokeMethod","class":"Sabre\\DAV\\Server","type":"->","args":[{"__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]},{"file":"/var/www/html/apps/dav/lib/Server.php","line":371,"function":"start","class":"OCA\\DAV\\Connector\\Sabre\\Server","type":"->","args":[]},{"file":"/var/www/html/apps/dav/appinfo/v2/remote.php","line":19,"function":"exec","class":"OCA\\DAV\\Server","type":"->","args":[]},{"file":"/var/www/html/remote.php","line":146,"args":["/var/www/html/apps/dav/appinfo/v2/remote.php"],"function":"require_once"}],"File":"/var/www/html/3rdparty/doctrine/dbal/src/Driver/PDO/Exception.php","Line":28,"Previous":{"Exception":"PDOException","Message":"SQLSTATE[40001]: Serialization failure: 1213 Deadlock found when trying to get lock; try restarting transaction","Code":"40001","Trace":[{"file":"/var/www/html/3rdparty/doctrine/dbal/src/Driver/PDO/Statement.php","line":130,"function":"execute","class":"PDOStatement","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/3rdparty/doctrine/dbal/src/Connection.php","line":1207,"function":"execute","class":"Doctrine\\DBAL\\Driver\\PDO\\Statement","type":"->","args":[]},{"file":"/var/www/html/3rdparty/doctrine/dbal/src/Connections/PrimaryReadReplicaConnection.php","line":292,"function":"executeStatement","class":"Doctrine\\DBAL\\Connection","type":"->","args":["UPDATE `oc_filecache` SET `mtime` = ?, `storage_mtime` = ? WHERE (`fileid` = ?) AND (`storage` = ?) AND (((`mtime` <> ?) OR (`mtime` IS NULL)) OR ((`storage_mtime` <> ?) OR (`storage_mtime` IS NULL)))",[1736784789,1736784789,"*** sensitive parameters replaced ***",8,1736784789,"And 1 more entries, set log level to debug to see all entries"],[2,2,1,1,2,"And 1 more entries, set log level to debug to see all entries"]]},{"file":"/var/www/html/lib/private/DB/Connection.php","line":462,"function":"executeStatement","class":"Doctrine\\DBAL\\Connections\\PrimaryReadReplicaConnection","type":"->","args":["UPDATE `oc_filecache` SET `mtime` = :dcValue5, `storage_mtime` = :dcValue6 WHERE (`fileid` = :dcValue1) AND (`storage` = :dcValue2) AND (((`mtime` <> :dcValue3) OR (`mtime` IS NULL)) OR ((`storage_mtime` <> :dcValue4) OR (`storage_mtime` IS NULL)))",{"dcValue1":"*** sensitive parameters replaced ***","dcValue2":8,"dcValue3":1736784789,"dcValue4":1736784789,"dcValue5":1736784789,"0":"And 1 more entries, set log level to debug to see all entries"},{"dcValue1":1,"dcValue2":1,"dcValue3":2,"dcValue4":2,"dcValue5":2,"0":"And 1 more entries, set log level to debug to see all entries"}]},{"file":"/var/www/html/lib/private/DB/ConnectionAdapter.php","line":67,"function":"executeStatement","class":"OC\\DB\\Connection","type":"->","args":["UPDATE `oc_filecache` SET `mtime` = :dcValue5, `storage_mtime` = :dcValue6 WHERE (`fileid` = :dcValue1) AND (`storage` = :dcValue2) AND (((`mtime` <> :dcValue3) OR (`mtime` IS NULL)) OR ((`storage_mtime` <> :dcValue4) OR (`storage_mtime` IS NULL)))",{"dcValue1":"*** sensitive parameters replaced ***","dcValue2":8,"dcValue3":1736784789,"dcValue4":1736784789,"dcValue5":1736784789,"0":"And 1 more entries, set log level to debug to see all entries"},{"dcValue1":1,"dcValue2":1,"dcValue3":2,"dcValue4":2,"dcValue5":2,"0":"And 1 more entries, set log level to debug to see all entries"}]},{"file":"/var/www/html/lib/private/DB/QueryBuilder/QueryBuilder.php","line":306,"function":"executeStatement","class":"OC\\DB\\ConnectionAdapter","type":"->","args":["UPDATE `*PREFIX*filecache` SET `mtime` = :dcValue5, `storage_mtime` = :dcValue6 WHERE (`fileid` = :dcValue1) AND (`storage` = :dcValue2) AND (((`mtime` <> :dcValue3) OR (`mtime` IS NULL)) OR ((`storage_mtime` <> :dcValue4) OR (`storage_mtime` IS NULL)))",{"dcValue1":"*** sensitive parameters replaced ***","dcValue2":8,"dcValue3":1736784789,"dcValue4":1736784789,"dcValue5":1736784789,"0":"And 1 more entries, set log level to debug to see all entries"},{"dcValue1":1,"dcValue2":1,"dcValue3":2,"dcValue4":2,"dcValue5":2,"0":"And 1 more entries, set log level to debug to see all entries"}]},{"file":"/var/www/html/lib/private/DB/QueryBuilder/ExtendedQueryBuilder.php","line":289,"function":"executeStatement","class":"OC\\DB\\QueryBuilder\\QueryBuilder","type":"->","args":[{"__class__":"OC\\DB\\ConnectionAdapter"}]},{"file":"/var/www/html/lib/private/DB/QueryBuilder/ExtendedQueryBuilder.php","line":55,"function":"executeStatement","class":"OC\\DB\\QueryBuilder\\ExtendedQueryBuilder","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/lib/private/Files/Cache/Cache.php","line":358,"function":"execute","class":"OC\\DB\\QueryBuilder\\ExtendedQueryBuilder","type":"->","args":[]},{"file":"/var/www/html/lib/private/Files/Cache/Updater.php","line":244,"function":"update","class":"OC\\Files\\Cache\\Cache","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/lib/private/Files/Cache/Updater.php","line":125,"function":"correctParentStorageMtime","class":"OC\\Files\\Cache\\Updater","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/apps/dav/lib/Connector/Sabre/File.php","line":330,"function":"update","class":"OC\\Files\\Cache\\Updater","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/apps/dav/lib/Connector/Sabre/Directory.php","line":110,"function":"put","class":"OCA\\DAV\\Connector\\Sabre\\File","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/apps/dav/lib/Upload/UploadFolder.php","line":34,"function":"createFile","class":"OCA\\DAV\\Connector\\Sabre\\Directory","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php","line":1098,"function":"createFile","class":"OCA\\DAV\\Upload\\UploadFolder","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/3rdparty/sabre/dav/lib/DAV/CorePlugin.php","line":504,"function":"createFile","class":"Sabre\\DAV\\Server","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/3rdparty/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"httpPut","class":"Sabre\\DAV\\CorePlugin","type":"->","args":[{"__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]},{"file":"/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php","line":472,"function":"emit","class":"Sabre\\DAV\\Server","type":"->","args":["method:PUT",[{"__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]]},{"file":"/var/www/html/apps/dav/lib/Connector/Sabre/Server.php","line":43,"function":"invokeMethod","class":"Sabre\\DAV\\Server","type":"->","args":[{"__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]},{"file":"/var/www/html/apps/dav/lib/Server.php","line":371,"function":"start","class":"OCA\\DAV\\Connector\\Sabre\\Server","type":"->","args":[]},{"file":"/var/www/html/apps/dav/appinfo/v2/remote.php","line":19,"function":"exec","class":"OCA\\DAV\\Server","type":"->","args":[]},{"file":"/var/www/html/remote.php","line":146,"args":["/var/www/html/apps/dav/appinfo/v2/remote.php"],"function":"require_once"}],"File":"/var/www/html/3rdparty/doctrine/dbal/src/Driver/PDO/Statement.php","Line":130}},"message":"Error while updating parent storage_mtime, should be safe to ignore","exception":{},"CustomMessage":"Error while updating parent storage_mtime, should be safe to ignore"}}
{"reqId":"u0sNjJ6GCqQ27xYMrlAQ","level":3,"time":"2025-01-13T16:16:56+00:00","remoteAddr":"91.41.200.254","user":"matthias","app":"no app in context","method":"MOVE","url":"/remote.php/dav/uploads/matthias/web-file-upload-fca6d1e8206a17a3/.file","message":"Could not open file","userAgent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36","version":"30.0.4.1","exception":{"Exception":"Sabre\\DAV\\Exception\\ServiceUnavailable","Message":"Could not open file","Code":0,"Trace":[{"file":"/var/www/html/apps/dav/lib/Upload/AssemblyStream.php","line":273,"function":"get","class":"OCA\\DAV\\Connector\\Sabre\\File","type":"->","args":[]},{"file":"/var/www/html/apps/dav/lib/Upload/AssemblyStream.php","line":143,"function":"getStream","class":"OCA\\DAV\\Upload\\AssemblyStream","type":"->","args":[{"__class__":"OCA\\DAV\\Connector\\Sabre\\File"}]},{"function":"stream_read","class":"OCA\\DAV\\Upload\\AssemblyStream","type":"->","args":[8192]},{"file":"/var/www/html/3rdparty/icewind/streams/src/Wrapper.php","line":55,"function":"fread","args":["*** sensitive parameters replaced ***",8192]},{"file":"/var/www/html/3rdparty/icewind/streams/src/CallbackWrapper.php","line":96,"function":"stream_read","class":"Icewind\\Streams\\Wrapper","type":"->","args":[8192]},{"function":"stream_read","class":"Icewind\\Streams\\CallbackWrapper","type":"->","args":[8192]},{"file":"/var/www/html/lib/private/Files/Storage/Local.php","line":304,"function":"file_put_contents","args":["/var/www/html/data/matthias/files/test-13GB.mkv.ocTransferId1891849956.part",null]},{"file":"/var/www/html/lib/private/Files/Storage/Local.php","line":622,"function":"file_put_contents","class":"OC\\Files\\Storage\\Local","type":"->","args":["files/test-13GB.mkv.ocTransferId1891849956.part",null]},{"file":"/var/www/html/lib/private/Files/Storage/Wrapper/Wrapper.php","line":629,"function":"writeStream","class":"OC\\Files\\Storage\\Local","type":"->","args":["files/test-13GB.mkv.ocTransferId1891849956.part",null,null]},{"file":"/var/www/html/lib/private/Files/Storage/Wrapper/Wrapper.php","line":629,"function":"writeStream","class":"OC\\Files\\Storage\\Wrapper\\Wrapper","type":"->","args":["files/test-13GB.mkv.ocTransferId1891849956.part",null,null]},{"file":"/var/www/html/apps/dav/lib/Connector/Sabre/File.php","line":208,"function":"writeStream","class":"OC\\Files\\Storage\\Wrapper\\Wrapper","type":"->","args":["files/test-13GB.mkv.ocTransferId1891849956.part",null]},{"file":"/var/www/html/apps/dav/lib/Connector/Sabre/Directory.php","line":110,"function":"put","class":"OCA\\DAV\\Connector\\Sabre\\File","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/3rdparty/sabre/dav/lib/DAV/Tree.php","line":325,"function":"createFile","class":"OCA\\DAV\\Connector\\Sabre\\Directory","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/3rdparty/sabre/dav/lib/DAV/Tree.php","line":151,"function":"copyNode","class":"Sabre\\DAV\\Tree","type":"->","args":[{"__class__":"OCA\\DAV\\Upload\\FutureFile"},{"__class__":"OCA\\DAV\\Files\\FilesHome"},"*** sensitive parameters replaced ***"]},{"file":"/var/www/html/3rdparty/sabre/dav/lib/DAV/Tree.php","line":181,"function":"copy","class":"Sabre\\DAV\\Tree","type":"->","args":["uploads/matthias/web-file-upload-fca6d1e8206a17a3/.file","files/matthias/test-13GB.mkv"]},{"file":"/var/www/html/apps/dav/lib/Upload/ChunkingPlugin.php","line":76,"function":"move","class":"Sabre\\DAV\\Tree","type":"->","args":["uploads/matthias/web-file-upload-fca6d1e8206a17a3/.file","files/matthias/test-13GB.mkv"]},{"file":"/var/www/html/apps/dav/lib/Upload/ChunkingPlugin.php","line":58,"function":"performMove","class":"OCA\\DAV\\Upload\\ChunkingPlugin","type":"->","args":["uploads/matthias/web-file-upload-fca6d1e8206a17a3/.file","files/matthias/test-13GB.mkv"]},{"file":"/var/www/html/3rdparty/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"beforeMove","class":"OCA\\DAV\\Upload\\ChunkingPlugin","type":"->","args":["uploads/matthias/web-file-upload-fca6d1e8206a17a3/.file","files/matthias/test-13GB.mkv"]},{"file":"/var/www/html/3rdparty/sabre/dav/lib/DAV/CorePlugin.php","line":603,"function":"emit","class":"Sabre\\DAV\\Server","type":"->","args":["beforeMove",["uploads/matthias/web-file-upload-fca6d1e8206a17a3/.file","files/matthias/test-13GB.mkv"]]},{"file":"/var/www/html/3rdparty/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"httpMove","class":"Sabre\\DAV\\CorePlugin","type":"->","args":[{"__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]},{"file":"/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php","line":472,"function":"emit","class":"Sabre\\DAV\\Server","type":"->","args":["method:MOVE",[{"__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]]},{"file":"/var/www/html/apps/dav/lib/Connector/Sabre/Server.php","line":43,"function":"invokeMethod","class":"Sabre\\DAV\\Server","type":"->","args":[{"__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]},{"file":"/var/www/html/apps/dav/lib/Server.php","line":371,"function":"start","class":"OCA\\DAV\\Connector\\Sabre\\Server","type":"->","args":[]},{"file":"/var/www/html/apps/dav/appinfo/v2/remote.php","line":19,"function":"exec","class":"OCA\\DAV\\Server","type":"->","args":[]},{"file":"/var/www/html/remote.php","line":146,"args":["/var/www/html/apps/dav/appinfo/v2/remote.php"],"function":"require_once"}],"File":"/var/www/html/apps/dav/lib/Connector/Sabre/File.php","Line":463,"message":"Could not open file","exception":{},"CustomMessage":"Could not open file"}}
{"reqId":"u0sNjJ6GCqQ27xYMrlAQ","level":3,"time":"2025-01-13T16:16:56+00:00","remoteAddr":"91.41.200.254","user":"matthias","app":"webdav","method":"MOVE","url":"/remote.php/dav/uploads/matthias/web-file-upload-fca6d1e8206a17a3/.file","message":"Could not open file","userAgent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36","version":"30.0.4.1","exception":{"Exception":"Sabre\\DAV\\Exception\\ServiceUnavailable","Message":"Could not open file","Code":0,"Trace":[{"file":"/var/www/html/apps/dav/lib/Upload/AssemblyStream.php","line":273,"function":"get","class":"OCA\\DAV\\Connector\\Sabre\\File","type":"->","args":[]},{"file":"/var/www/html/apps/dav/lib/Upload/AssemblyStream.php","line":143,"function":"getStream","class":"OCA\\DAV\\Upload\\AssemblyStream","type":"->","args":[{"__class__":"OCA\\DAV\\Connector\\Sabre\\File"}]},{"function":"stream_read","class":"OCA\\DAV\\Upload\\AssemblyStream","type":"->","args":[8192]},{"file":"/var/www/html/3rdparty/icewind/streams/src/Wrapper.php","line":55,"function":"fread","args":["*** sensitive parameters replaced ***",8192]},{"file":"/var/www/html/3rdparty/icewind/streams/src/CallbackWrapper.php","line":96,"function":"stream_read","class":"Icewind\\Streams\\Wrapper","type":"->","args":[8192]},{"function":"stream_read","class":"Icewind\\Streams\\CallbackWrapper","type":"->","args":[8192]},{"file":"/var/www/html/lib/private/Files/Storage/Local.php","line":304,"function":"file_put_contents","args":["/var/www/html/data/matthias/files/test-13GB.mkv.ocTransferId1891849956.part",null]},{"file":"/var/www/html/lib/private/Files/Storage/Local.php","line":622,"function":"file_put_contents","class":"OC\\Files\\Storage\\Local","type":"->","args":["files/test-13GB.mkv.ocTransferId1891849956.part",null]},{"file":"/var/www/html/lib/private/Files/Storage/Wrapper/Wrapper.php","line":629,"function":"writeStream","class":"OC\\Files\\Storage\\Local","type":"->","args":["files/test-13GB.mkv.ocTransferId1891849956.part",null,null]},{"file":"/var/www/html/lib/private/Files/Storage/Wrapper/Wrapper.php","line":629,"function":"writeStream","class":"OC\\Files\\Storage\\Wrapper\\Wrapper","type":"->","args":["files/test-13GB.mkv.ocTransferId1891849956.part",null,null]},{"file":"/var/www/html/apps/dav/lib/Connector/Sabre/File.php","line":208,"function":"writeStream","class":"OC\\Files\\Storage\\Wrapper\\Wrapper","type":"->","args":["files/test-13GB.mkv.ocTransferId1891849956.part",null]},{"file":"/var/www/html/apps/dav/lib/Connector/Sabre/Directory.php","line":110,"function":"put","class":"OCA\\DAV\\Connector\\Sabre\\File","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/3rdparty/sabre/dav/lib/DAV/Tree.php","line":325,"function":"createFile","class":"OCA\\DAV\\Connector\\Sabre\\Directory","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/3rdparty/sabre/dav/lib/DAV/Tree.php","line":151,"function":"copyNode","class":"Sabre\\DAV\\Tree","type":"->","args":[{"__class__":"OCA\\DAV\\Upload\\FutureFile"},{"__class__":"OCA\\DAV\\Files\\FilesHome"},"*** sensitive parameters replaced ***"]},{"file":"/var/www/html/3rdparty/sabre/dav/lib/DAV/Tree.php","line":181,"function":"copy","class":"Sabre\\DAV\\Tree","type":"->","args":["uploads/matthias/web-file-upload-fca6d1e8206a17a3/.file","files/matthias/test-13GB.mkv"]},{"file":"/var/www/html/apps/dav/lib/Upload/ChunkingPlugin.php","line":76,"function":"move","class":"Sabre\\DAV\\Tree","type":"->","args":["uploads/matthias/web-file-upload-fca6d1e8206a17a3/.file","files/matthias/test-13GB.mkv"]},{"file":"/var/www/html/apps/dav/lib/Upload/ChunkingPlugin.php","line":58,"function":"performMove","class":"OCA\\DAV\\Upload\\ChunkingPlugin","type":"->","args":["uploads/matthias/web-file-upload-fca6d1e8206a17a3/.file","files/matthias/test-13GB.mkv"]},{"file":"/var/www/html/3rdparty/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"beforeMove","class":"OCA\\DAV\\Upload\\ChunkingPlugin","type":"->","args":["uploads/matthias/web-file-upload-fca6d1e8206a17a3/.file","files/matthias/test-13GB.mkv"]},{"file":"/var/www/html/3rdparty/sabre/dav/lib/DAV/CorePlugin.php","line":603,"function":"emit","class":"Sabre\\DAV\\Server","type":"->","args":["beforeMove",["uploads/matthias/web-file-upload-fca6d1e8206a17a3/.file","files/matthias/test-13GB.mkv"]]},{"file":"/var/www/html/3rdparty/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"httpMove","class":"Sabre\\DAV\\CorePlugin","type":"->","args":[{"__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]},{"file":"/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php","line":472,"function":"emit","class":"Sabre\\DAV\\Server","type":"->","args":["method:MOVE",[{"__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]]},{"file":"/var/www/html/apps/dav/lib/Connector/Sabre/Server.php","line":43,"function":"invokeMethod","class":"Sabre\\DAV\\Server","type":"->","args":[{"__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]},{"file":"/var/www/html/apps/dav/lib/Server.php","line":371,"function":"start","class":"OCA\\DAV\\Connector\\Sabre\\Server","type":"->","args":[]},{"file":"/var/www/html/apps/dav/appinfo/v2/remote.php","line":19,"function":"exec","class":"OCA\\DAV\\Server","type":"->","args":[]},{"file":"/var/www/html/remote.php","line":146,"args":["/var/www/html/apps/dav/appinfo/v2/remote.php"],"function":"require_once"}],"File":"/var/www/html/apps/dav/lib/Connector/Sabre/File.php","Line":463,"message":"Could not open file","exception":{},"CustomMessage":"Could not open file"}}

Did you check the php.ini in /etc/php/*/?

There is no /etc/php in the docker image.

This is how I open a shell in the nextcloud image:

docker exec -ti --user www-data nextcloud-app-1 bash

and in that image /etc/php does not exist.

What I find is

/usr/local/etc/php/

www-data@1bb801ff5ef0:/usr/local/etc/php$ ls -l
total 82
drwxr-xr-x 1 root root     3 Jan 13 17:45 conf.d
-rw-r--r-- 1 root root 73724 Dec  3 02:28 php.ini-development
-rw-r--r-- 1 root root 73870 Dec  3 02:28 php.ini-production

and in /usr/local/etc/php/conf.d:

www-data@1bb801ff5ef0:/usr/local/etc/php/conf.d$ ls -l 
total 19
-rw-r--r-- 1 root root  96 Dec  3 02:28 docker-fpm.ini
-rw-r--r-- 1 root root  32 Dec 12 22:32 docker-php-ext-apcu.ini
-rw-r--r-- 1 root root  20 Dec 12 22:30 docker-php-ext-bcmath.ini
-rw-r--r-- 1 root root  18 Dec 12 22:30 docker-php-ext-exif.ini
-rw-r--r-- 1 root root  17 Dec 12 22:30 docker-php-ext-ftp.ini
-rw-r--r-- 1 root root  16 Dec 12 22:30 docker-php-ext-gd.ini
-rw-r--r-- 1 root root  17 Dec 12 22:31 docker-php-ext-gmp.ini
-rw-r--r-- 1 root root  18 Dec 12 22:32 docker-php-ext-imagick.ini
-rw-r--r-- 1 root root  18 Dec 12 22:31 docker-php-ext-intl.ini
-rw-r--r-- 1 root root  18 Dec 12 22:31 docker-php-ext-ldap.ini
-rw-r--r-- 1 root root  20 Dec 12 22:32 docker-php-ext-memcached.ini
-rw-r--r-- 1 root root  26 Dec 12 22:31 docker-php-ext-opcache.ini
-rw-r--r-- 1 root root  19 Dec 12 22:31 docker-php-ext-pcntl.ini
-rw-r--r-- 1 root root  23 Dec 12 22:31 docker-php-ext-pdo_mysql.ini
-rw-r--r-- 1 root root  23 Dec 12 22:31 docker-php-ext-pdo_pgsql.ini
-rw-r--r-- 1 root root  16 Dec 12 22:32 docker-php-ext-redis.ini
-rw-r--r-- 1 root root  17 Dec  3 02:28 docker-php-ext-sodium.ini
-rw-r--r-- 1 root root  21 Dec 12 22:31 docker-php-ext-sysvsem.ini
-rw-r--r-- 1 root root  17 Dec 12 22:32 docker-php-ext-zip.ini
-rw-r--r-- 1 root root 107 Dec 12 22:32 nextcloud.ini
-rw-r--r-- 1 root root 216 Dec 12 22:32 opcache-recommended.ini
-rw-r--r-- 1 root root 171 Jan 13 17:45 redis-session.ini

Since you’re using the Web UI to upload, chunking is being used so there’s no need to mess with PHP_UPLOAD_LIMIT.

The failure is a simple fopen() call on your local disk.

Are you seeing any other errors in your fpm error log (check the container log output)?

Is your host using SELinux by chance?

What is your host environment? Is it virtualized? Anything notable about the underlying storage? Is it network-based? etc.

Please use the etc/php folder on the debian host, but not within docker image.
On the host system there is Apache/Nginx running with php.

The host system is debian stable:

Linux debserv 6.1.0-29-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.123-1 (2025-01-02) x86_64 GNU/Linux

And there is no /etc/php:

╰─# ls -d /etc/p*
/etc/pam.conf  /etc/papersize  /etc/passwd-  /etc/pki       /etc/polkit-1  /etc/ppp      /etc/profile.d  /etc/pulse    /etc/python3.11
/etc/pam.d     /etc/passwd     /etc/perl     /etc/plymouth  /etc/postfix   /etc/profile  /etc/protocols  /etc/python3

How do I check those? Where are they?

No. This is debian stable with no selinux.

No. This is a regular PC dedicated to nextcloud. Nothing else running but debian stable and nextcloud with docker compose. … And caddy as reverse proxy.

PS
I have to add the ufw firewall that is running on the debian host:

╰─# ufw status verbose
Status: active
Logging: on (low)
Default: deny (incoming), allow (outgoing), deny (routed)
New profiles: skip

To                         Action      From
--                         ------      ----
443                        ALLOW IN    Anywhere                  
Anywhere                   ALLOW IN    192.168.132.0/24          
Anywhere                   ALLOW IN    172.16.0.0/12             
22/tcp                     ALLOW IN    Anywhere                  
443 (v6)                   ALLOW IN    Anywhere (v6)             
53805/udp                  DENY IN     fe80::de39:6fff:fe07:4619 
22/tcp (v6)                ALLOW IN    Anywhere (v6)

I know you’re just trying to help, but you’re mistaken. PHP is running in the container. It’s part of the image. And chunking is being used anyhow. The post_max_size and upload_max_filesize settings are not the problem here (well unless they’re set insanely low or something).

How do I check those? Where are they?

@mabod The container log is just the docker log for the container. Something like docker logs nextcloud-app-1 or the docker compose logs equivalent.

1 Like

docker logs nextcloud-app-1 does not show an error. But nextcloud-web-1 does.

I tried the upload again and saw this with
docker logs nextcloud-web-1

172.18.0.1 - - [13/Jan/2025:20:21:27 +0000] "GET /ocs/v2.php/apps/notifications/api/v2/notifications HTTP/1.1" 304 0 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36" "91.41.200.254"
172.18.0.1 - - [13/Jan/2025:20:21:28 +0000] "POST /apps/text/session/451078/sync HTTP/1.1" 200 377 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36" "91.41.200.254"
172.18.0.1 - - [13/Jan/2025:20:21:28 +0000] "POST /apps/text/session/451078/push HTTP/1.1" 200 65 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36" "91.41.200.254"
2025/01/13 20:21:35 [error] 30#30: *1830 upstream timed out (110: Connection timed out) while reading response header from upstream, client: 172.18.0.1, server: , request: "MOVE /remote.php/dav/uploads/matthias/web-file-upload-282c1e1172cb9a25/.file HTTP/1.1", upstream: "fastcgi://172.18.0.5:9000", host: "mydomain"
172.18.0.1 - - [13/Jan/2025:20:21:35 +0000] "MOVE /remote.php/dav/uploads/matthias/web-file-upload-282c1e1172cb9a25/.file HTTP/1.1" 504 562 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36" "91.41.200.254"
172.18.0.1 - - [13/Jan/2025:20:21:38 +0000] "DELETE /remote.php/dav/uploads/matthias/web-file-upload-282c1e1172cb9a25 HTTP/1.1" 204 0 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36" "91.41.200.254"
172.18.0.1 - - [13/Jan/2025:20:22:27 +0000] "GET /ocs/v2.php/apps/notifications/api/v2/notifications HTTP/1.1" 304 0 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36" "91.41.200.254"
172.18.0.1 - - [13/Jan/2025:20:22:27 +0000] "POST /apps/text/session/451078/push HTTP/1.1" 200 22 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36" "91.41.200.254"
172.18.0.1 - - [13/Jan/2025:20:22:27 +0000] "POST /apps/text/session/451078/sync HTTP/1.1" 200 377 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36" "91.41.200.254"

Looks like a timeout to me. The upload of 13GB takes several minutes in my case. Are there any timeout values I should change?

I connected the gnome desktop with nextcloud and did a successful upload with the filemanager nautilus. I did several successful uploads up to a filesize of 26 GB.

So the problem I am experiencing is only with the web GUI.

Possibly fastcgi_read_timeout.

(mentioned briefly in the Admin Manual - Uploading big files: Nginx chapter section, but this chapter could use an overhaul to make things way clearer).

During the MOVE (chunk assembly), the connection is idle (no traffic is being transmitted) while it waits for that big operation to finish (constrained by disk I/O most likely).

This also aligns with your Nautilus versus Web UI test, since Nautilus isn’t using chunking (unless something has changed in its support).

It sounds like perhaps your environment is more storage I/O bound (rather than network throughput bound), at least for this particular type of transaction.

So I’d also experiment a bit with bumping up the Web UI client’s max_chunk_size from the default (10 MiB in <=v30) significantly (easily 10x or even 100x). This may help with the timeouts in your case (depending on why assembly is taking so long).

You may even want to experiment with disabling chunking in the Web UI client (setting max_chunk_size to 0). This should effectively make it equivalent to the Nautilus transactions.

Just beware max_chunk_size currently is global scope… (i.e. impacts all accounts on the same instance).

Along the same vein of things, anything you can do to speed up your server’s underlying disk I/O performance could help.

That was it. I have set that value to 1200 s and was able to upload a file of 26 GB with the web GUI. Thank you, @jtr1

This is what I have now in my nginx.conf:

# set max upload size and increase upload timeout:
client_max_body_size 50G;
client_body_timeout 1200s;
fastcgi_buffers 64 4K;
fastcgi_read_timeout 1200s;

I removed the “max_size 50G” from the caddy config file (reverse proxy) and it still works.

Thanks a lot!

1 Like

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.