Web page load very slow and wait for fixed duration

version 16.0.3

my nginx.conf use this

and docker-compose.yml:

version: '3'

services:
  redis:
    image: redis:alpine
    restart: always

  app:
    image: nextcloud:fpm-alpine
    restart: always
    volumes:
      - ./nextcloud:/var/www/html
    environment:
      - MYSQL_HOST=xxx
      - REDIS_HOST=xxx
    env_file:
      - db.env
    depends_on:
      - redis

  web:
    image: nginx:alpine
    restart: always
    ports:
      - 8080:80
    volumes:
      - ./nextcloud:/var/www/html:ro
      - ./nginx.conf:/etc/nginx/nginx.conf:ro
    depends_on:
      - app

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

every page load wait for more than 10 seconds

My server(4C16G) only runs for this app and CPU usage is very low
%Cpu(s): 1.4 us, 4.3 sy, 0.0 ni, 94.2 id, 0.0 wa

Is it still slow if you expose a port on the app container and access it directly?

I changed to nextcloud:apache and the same problem

by the way, I use reverse proxy

    location /nextcloud/ {
        proxy_pass_header Authorization;
        proxy_pass http://ip:8080/;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            #proxy_http_version 1.1;
            #proxy_set_header Connection "";
            #proxy_buffering off;
        client_max_body_size 0;
        #proxy_redirect off;
            #proxy_ssl_session_reuse off;
            #proxy_connect_timeout 600;
            #proxy_send_timeout 600;
            #proxy_read_timeout 600;
            #send_timeout 600;
    }

Yes, I’m asking if it’s still slow without the reverse proxy?

Yes, the same problem when access directly when use apache image

Anyone can tell me how to find out the reason?