Closed AndreiArdei closed 2 months ago
Are you uploading the files via web or NC client ? I just finished uploading 38 gig file and had 0 issues. Over the last two years I've uploaded terabytes of data via the NC app and had only one issue, and that was a datacenter outage that caused some weird database issues, but after fixing it I still have no problems with large files. Max i've tried is approx 500 gigabytes file and it went okay.
Unfortunately with both the web and the NC client. The NC client seems to be a tad faster than over the web but still slow. IT does work if i turn of chunking (i.e. set max_chunk_size) to 0 but then the upload speed is next to nothing for a 1.5GB file. If I set it to the default 10MB or even 20MB the upload speed seems to pick up but it fails.
Using web for large (>5GB) files is always pain due php limits. The NC desktop client should not have any issues with chunked upload. Can you try to revert the change to max-chunk-size and try with the desktop app ?
Just for my peace of mind, this is also how I attach the NFS share.
192.168.1.139:/mnt/pool01/docker /var/lib/docker/volumes nfs x-systemd.automount,rw,soft,sync 0 0
Basically I mount the entire docker volumes directory to the nfs share. Meaning all volumes are actually created on the share not on the machine where I run docker (and nextcloud) from.
I did two tests with the NC Client:
I am now retrying with the 20MB chunking from the desktop and then I will also set it to the default 10MB chunking and try again.
Just tried with 10MB chunking size. Still fails:
This time however I don't get any sort of errors in the server logs.
[PHP] Error: rmdir(/mnt/ncdata/admin/uploads/web-file-upload-15252b578fdf95d6740fb72e4e6c488a-1687753536511): Directory not empty at /var/www/html/lib/private/Files/Storage/Local.php#147
What is /mnt/ncdata
? That's not indicated in your provided Compose.
[PHP] Error: rmdir(/mnt/ncdata/admin/uploads/web-file-upload-15252b578fdf95d6740fb72e4e6c488a-1687753536511): Directory not empty at /var/www/html/lib/private/Files/Storage/Local.php#147
What is
/mnt/ncdata
? That's not indicated in your provided Compose.
That is a really good question and i am not sure. I've looke both in the container, on the machine running docker and on the machine that hosts the volumes, it doesn't exist ? I can't find it anywhere. Als it's not something i'd setup since it doesn't follow my format for naming volumes or anyhting else.
https://help.nextcloud.com/t/what-is-mnt-ncdata-for/189789 Edit: I did come across this, however I still cannot find it on the host machine as a real directory.
Did you previously use the All-In-One image? I believe it's the default datadirectory
for that image.
Is it referenced under occ config:list system --private | grep ncdata
? Or perhaps are there some symbolic links in your data directory?
I did indeed try an all-in-one image months ago, however that did not work for me so I removed the container, image and volumes related to it. Running the command you provided results in no data. Even if i don't do the grep for ncdata
, this directory isn't there anyway.
Also cannot seem to find any symbolic links to it
The way this image works and based on your Compose:
/mnt/ncdata/admin/uploads/web-file-upload-15252b578fdf95d6740fb72e4e6c488a-1687753536511
should be:
/var/www/html/data/admin/web-file-upload-15252b578fdf95d6740fb72e4e6c488a-1687753536511
Do you have any data in your user's home directory within the container - e.g. /var/www/html/data/admin
should contain files you've created or uploaded?
So, I did a bit more testing. To answer some questions:
admin
directory in /var/www/htm/data
inside the containerThe directory is therem but it is empty, running ls -A
in there returns nothing.
There is no admin directory in /var/www/htm/data inside the container
I'm skeptical this is something in the image. This really sounds like something in your local environment.
I'm also confused because earlier you had references to /mnt/ncdata
but now your log entries say /var/www/html/data
?
Do you have multiple instances running?
Can you try just bringing up a simple standalone container running the 29-apache image and/or the 30-apache image:
$ docker run -d \
-p 2980:80 \
-v test_29_nextcloud:/var/www/html \
nextcloud:29-apache
$ docker run -d \
-p 3080:80 \
-v test_30_nextcloud:/var/www/html \
nextcloud:29-apache
Just do an sqlite install so you don't need a separate db.
Then accessing as http://localhost:{29,30}80/
(or IP if not on localhost
) and try to reproduce your situation against them.
Sure!
So a few things that I changed in the meantime and maybe forgot to mention:
Now, I ran both of the images as you indicated.
nextcloud:apache
) cannot upload the 1.04GB rar file. This is the error I get on v29:
Basically I mount the entire docker volumes directory to the nfs share. Meaning all volumes are actually created on the share not on the machine where I run docker (and nextcloud) from.
Now try it w/o using Docker managed volumes so that you can isolate whether it's your NFS /Docker setup or not. e.g.
$ docker run -d \
-p 2980:80 \
-v ./blah/test_29_nextcloud:/var/www/html \
nextcloud:29-apache
Just tried it. Tried the 2.5GB video file directly.
Off the bat, just starting the container is much much faster. Before I'd have to wait 4-5 minutes before the container would go past "Initializing nextcloud". Uploading went super fast and succedded.
That would then indeed mean that the issue is with the nfs mount.
After playing a little more with my NFS settings, I seem to have found something that works. Indeed seems as the issue was nfs related and nothing in nextcloud, in hind sight that makes sense since it was quite all over the place before.
For anyone having similar issues in the future, these settings seem to work for me with nc finally:
https://www.truenas.com/community/threads/recommended-options-for-mounting-nfs-shares.88519/
Hi! I've recently set up nextcloud using docker. The OS that docker runs on is Ubuntu 22.04.4 LTS. I provided the docker compose file below. My docker volume is mounted on a sepparate NFS share, therefore all volumes are mounted on the nfs share.
The problem I run into is that when I try to upload larger files, this fails with the error:
[PHP] Error: rmdir(/mnt/ncdata/admin/uploads/web-file-upload-15252b578fdf95d6740fb72e4e6c488a-1687753536511): Directory not empty at /var/www/html/lib/private/Files/Storage/Local.php#147
I managed to find the following link to problem however, there it is specified that the error is in the alpine version, where as I am using the
nextcloud:apache
tag. I was able to have a workaround by turning off chunking with the following command:This seems to allow larger files now, however it has slowed down upload time considerably. Is there any known fix or work-around / other image that I could use to work around this problem?