linuxserver / docker-mods

Documentation and Examples of base container modifications
GNU General Public License v3.0
1.12k stars 286 forks source link

[BUG] in slow connect dashboard will return timeout #983

Open hadyang opened 1 day ago

hadyang commented 1 day ago

Is there an existing issue for this?

Name of mod

linuxserver/mods:swag-dashboard

Name of base container

lscr.io/linuxserver/swag

Current Behavior

When I request https://dashboard.example.top , its return 504 gateway time-out

Expected Behavior

expect return 200

Steps To Reproduce

  1. deploy with docker compose.
  2. use default config
  3. visit https://dashboard.example.top
  4. return 504

Environment

- OS: Debian 12
- How docker service was installed:

CPU architecture

x86-64

Docker creation

services:
  swag:
    image: lscr.io/linuxserver/swag
    container_name: swag
    cap_add:
      - NET_ADMIN
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Asia/Shanghai
      - URL=hadyang.top
      - SUBDOMAINS=www,dashboard,auth
      - VALIDATION=dns
      - DNSPLUGIN=dnspod
      - DOCKER_MODS=linuxserver/mods:swag-dashboard
    networks: 
      - web
    ports:
      - 8081:80
      - 8443:443
    volumes:
      - ./config:/config
    restart: unless-stopped
networks:
  web:
    external: true

Container logs

swag  | **** Applying the SWAG dashboard mod... ****

swag  | **** Adding goaccess to package install list ****
swag  | **** libmaxminddb already installed, skipping ****
swag  | **** Applied the SWAG dashboard mod ****
swag  | [pkg-install-init] **** Installing all mod packages ****
swag  | fetch http://dl-cdn.alpinelinux.org/alpine/v3.20/main/x86_64/APKINDEX.tar.gz
swag  | fetch http://dl-cdn.alpinelinux.org/alpine/v3.20/community/x86_64/APKINDEX.tar.gz
swag  | (1/1) Installing goaccess (1.9.2-r0)

swag  | Executing busybox-1.36.1-r29.trigger
swag  | OK: 200 MiB in 221 packages
swag  | [custom-init] No custom files found, skipping...

swag  | [ls.io-init] done.
swag  | Server ready
hadyang commented 1 day ago

i guess the timeout reason is 'https://info.linuxserver.io/index.xml' has big size, and in my network fetch this file is slow.

so. i try to remove 'GetAnnouncements' in index.php, it's work.

can we consider localize the 'https://info.linuxserver.io/index.xml' to file?