Why does my NC make two temp files simultaneously when uploading a file?

Nextcloud version: 27.0.0
Operating system and version: Debian Buster
Apache or nginx version: nginx/1.18.0

I’m using the AIO version of NC behind nginx reverse proxy.

In my nginx, proxy_request_buffer is disabled so client body directly goes to Docker container without making any cache files.

When uploading, I can find the incomplete file in the destination folder. ([data directory]/[my username]/files/[destination folder]) But at the same time, [data directory]/tmp folder contains the file that looks like the same incomplete file.

Both files have the same size and that increases with the progress of uploading. The file in tmp has the prefix php* and following randomized alphabets. And the file in the destination folder has the original file name but with the prefix *.part

When uploading is completed, both files are removed and the complete file appears in the destination folder.

A year ago, this phenomenon appeared on my old instance of NC too, which is installed natively without docker containers.
I think these two files are made for the same purpose, and they’re just doubling my disk throughput. It does not make any performance issues yet but I’m curious about this behavior and a bit worried if I have misconfigured my instance. I’d be really grateful if someone can explain this!

1 Like

For larger files, multiple chunks are uploaded at the same time:
https://docs.nextcloud.com/desktop/3.9/advancedusage.html#configuration-file

I have set max_chunk_size(occ config:app:set files) to 0 for no chunking at all. So I think they’re not chunk files. And this occurs when I’m uploading using the web interface. Seems like the configuration of the local client app is not related.

But thank you for helping me!