Docker update hangs when initiating

Hello forum,

my Docker hangs in a loop after starting:

next  | Initializing nextcloud 30.0.0.14 ...
next  | Upgrading nextcloud from 29.0.6.1 ...
next exited with code 0
next  | Initializing nextcloud 30.0.0.14 ...
next  | Upgrading nextcloud from 29.0.6.1 ...

Here is my Compose file, which I have been using for 2-3 years.

services:
  app:
    image: nextcloud
    container_name: "mynextc"
    restart: always
    ports:
      - 7435:80
    labels:
            - "autoheal=true"      
            - "traefik.enable=true"
    healthcheck:
          test: curl --fail http://localhost:80/ || exit 1
          interval: 40s
          timeout: 30s
          retries: 3
          start_period: 60s
    volumes:
      - /FS-Cluster/docker/next/data:/var/www/html
    environment:
      - MYSQL_PASSWORD=*PASSWORD*
      - MYSQL_DATABASE=nextcloud
      - MYSQL_USER=mynextc
      - MYSQL_HOST=192.168.231.231:60033

networks:
  default:
    name: public-traefik-proxy
    external: true

Up until now it was always enough to end the maintenance mode and then start the update.

docker exec -u www-data mynextc php occ maintenance:mode --off

Does anyone have an idea or a solution for this?

What type of filesystem is /FS-Cluster/docker/next/data?

Up until now it was always enough to end the maintenance mode and then start the update.

How often have you had to do that during updates? Is that typical for you? (It shouldn’t be, which is why I ask).

You should be able to open a docker [compose] exec session into the container and possibly see what processes are running (well, I guess you can look for them in the underlying host’s process list too).

My guess is rsync is interacting with the underlying host volume /FS-Cluster/ somehow. Perhaps NFS?

There is a gluster FS behind the FS cluster and I have been using it for about 2 years.

Due to the question regarding the FS cluster, I moved the Docker container to a distance without a cluster.

I was able to start the Docker container again to the point where various errors occurred in the console.
The solution was:

docker exec -u www-data mynextc php ./occ maintenance:repair

docker exec -u www-data mynextc php ./occ upgrade

docker exec -u www-data mynextc php occ maintenance:mode --off

The Docker container is now running again with the latest version. I’m moving iin garde back to the cluster, let’s see what happens there.