nextcloud / docker

⛴ Docker image of Nextcloud
https://hub.docker.com/_/nextcloud/
GNU Affero General Public License v3.0
5.92k stars 1.82k forks source link

Upgrade from 25.0.2 to 25.0.3 never completes - multple stuck rsync processes #1904

Open xamindar opened 1 year ago

xamindar commented 1 year ago

This update has some flaw with the upgrade where rsync is hung indefinitely. Exec into the pod and only these processes are running:

root@nextcloud-server-5f8cb45955-ss5rk:/var/www/html# ps aux
USER         PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root           1  0.0  0.0   2060  1388 ?        Ss   05:21   0:00 /bin/sh /entrypoint.sh apache2-foreground
root          43  0.1  0.0 185392  6344 ?        S    05:21   0:00 rsync -rlDog --chown www-data:www-data --delete --exclude-from=/upgrade.exclude /usr/src/
root          44  0.7  0.0 155796  5752 ?        S    05:21   0:00 rsync -rlDog --chown www-data:www-data --delete --exclude-from=/upgrade.exclude /usr/src/
root          45  0.6  0.0 185656  5536 ?        D    05:21   0:00 rsync -rlDog --chown www-data:www-data --delete --exclude-from=/upgrade.exclude /usr/src/
root          46  0.3  0.0   3956  3028 pts/0    Ss   05:23   0:00 /bin/bash
root          53  0.0  0.0   6444  2408 pts/0    R+   05:23   0:00 ps aux
root@nextcloud-server-5f8cb45955-ss5rk:/var/www/html# 

This was left like this for a couple hours and never finished. It appears the rsync commands just hang and never return or exit. image being used is: 25.0.3-apache

Not sure what was broke in this new version (I have successfully upgraded in the past), but rolling back to 25.0.2 and it's working again.

joshtrichards commented 1 year ago

Possibly related to #1728?

joshtrichards commented 10 months ago

What's your underlying filesystem?

major-mayer commented 5 months ago

I am having the same problem upgrading during a minor update. The logs just show this:

Upgrading nextcloud from 28.0.2.5 ...
Initializing nextcloud 28.0.3.2 ...
Configuring Redis as session handler

While I also have 3 rsync processes running doing a similiar thing (copying files from /usr/src/... to my mounted webroot, next time i will copy the exact name). Eventually it always completes, but it takes a veery long time, which means up to half an hour, even tho my system only uses SSDs which is too much i think.

My underlying file system is a virtual ext4 formatted drive and a mounted NFS share from the same host (I am using the container in a VM).

df -Th
tmpfs                           tmpfs  1,1G    2,6M  1,1G    1% /run
/dev/vda2                       ext4   147G    114G   26G   82% /
tmpfs                           tmpfs  5,4G       0  5,4G    0% /dev/shm
tmpfs                           tmpfs  5,0M       0  5,0M    0% /run/lock
/dev/vda1                       vfat   511M    6,1M  505M    2% /boot/efi
10.26.3.10:/mnt/data/rancher    nfs    3,3T    1,4T  1,9T   42% /nfs/freenas

The webroot (/var/www/html) is mounted to /nfs/freenas/{my-nextcloud-subfolder} but I think Docker creates its internal volumes/ layers in the root filesystem (ext4).

davidfrickert commented 1 day ago

i have the same issue.

my automatic upgrades never work...

i am also using NFS for /var/www/html/data and /var/www/html

i'm running kubernetes so the pods are killed due to taking way too long to get healthy