linuxserver / docker-nextcloud

GNU General Public License v3.0
677 stars 128 forks source link

[BUG] Download Crash if Bandwith is small #347

Closed Svenum closed 9 months ago

Svenum commented 11 months ago

Is there an existing issue for this?

Current Behavior

If I download a File (1GB) via a public file share link with about 8Mbit/s or less the stream crashes after 30 to 60 seconds.

Expected Behavior

File download successfully

Steps To Reproduce

  1. Upload a file to Nextcloud
  2. create a Publish Share-Link
  3. Download the file with this commands:
    # 8 Mbit/s
    wget --limit-rate=8388608 https://nextcloud.domain.com/s/JsfefsdfsdfLTc3F6W67/download/File.zip
    # 4 Mbit/s
    wget --limit-rate=4194304 https://nextcloud.domain.com/s/JsfefsdfsdfLTc3F6W67/download/File.zip
    # 2 Mbit/s
    wget --limit-rate=2097152 https://nextcloud.domain.com/s/JsfefsdfsdfLTc3F6W67/download/File.zip

    Info: I run a treafik after the Nextcloud so maybe the problem is related to it too.

Environment

- OS:
- How docker service was installed:

CPU architecture

x86-64

Docker creation

-compose
networks:
    proxy_default:
        external: true

services:
    nextcloud:
        hostname: svc-nextcloud
        networks:
            proxy_default:
            default:
        volumes:
            - /mnt/user/Nextcloud:/data
            - /mnt/user/appdata/nc/nextcloud:/config
        environment:
            NEXTCLOUD_UPLOAD_LIMIT: "10G"
            DEBUG: 4
            PUID: 99
            GUID: 100
            UMASK: 022
        image: "lscr.io/linuxserver/nextcloud:latest"
        labels:
            traefik.enable: true
            traefik.http.routers.nextcloud.entryPoints: https
            traefik.http.services.nextcloud.loadbalancer.server.scheme: https
            traefik.http.services.nextcloud.loadbalancer.server.port: 443

Container logs

[migrations] started
[migrations] 01-nginx-site-confs-default: skipped
[migrations] 02-default-location: skipped
[migrations] done
───────────────────────────────────────

      ██╗     ███████╗██╗ ██████╗ 
      ██║     ██╔════╝██║██╔═══██╗
      ██║     ███████╗██║██║   ██║
      ██║     ╚════██║██║██║   ██║
      ███████╗███████║██║╚██████╔╝
      ╚══════╝╚══════╝╚═╝ ╚═════╝ 

   Brought to you by linuxserver.io
───────────────────────────────────────

To support LSIO projects visit:
https://www.linuxserver.io/donate/

───────────────────────────────────────
GID/UID
───────────────────────────────────────

User UID:    99
User GID:    911
───────────────────────────────────────

using keys found in /config/keys
Initializing nextcloud 27.0.1.2 (this can take a while) ...
Setting permissions
Initializing finished
**** The following active confs have different version dates than the samples that are shipped. ****
**** This may be due to user customization or an update to the samples. ****
**** You should compare the following files to the samples in the same folder and update them. ****
**** Use the link at the top of the file to view the changelog. ****
┌────────────┬────────────┬────────────────────────────────────────────────────────────────────────┐
│  old date  │  new date  │ path                                                                   │
├────────────┼────────────┼────────────────────────────────────────────────────────────────────────┤
│ 2022-08-16 │ 2023-04-13 │ /config/nginx/nginx.conf                                               │
│ 2022-08-20 │ 2023-06-24 │ /config/nginx/ssl.conf                                                 │
│ 2022-08-20 │ 2023-06-23 │ /config/nginx/site-confs/default.conf                                  │
└────────────┴────────────┴────────────────────────────────────────────────────────────────────────┘
[custom-init] No custom files found, skipping...
/usr/bin/with-contenv: line 6: umask: 18: octal number out of range
/usr/bin/with-contenv: line 6: umask: 18: octal number out of range
/usr/bin/with-contenv: line 6: umask: 18: octal number out of range
[ls.io-init] done.
github-actions[bot] commented 11 months ago

Thanks for opening your first issue here! Be sure to follow the relevant issue templates, or risk having this issue marked as invalid.

Svenum commented 10 months ago

Some news on this?

j0nnymoe commented 10 months ago

Have you tried it without going via traefik? Also that upload limit enc you're using isn't a thing.

Svenum commented 10 months ago

Traefik is not the Problem. The Download works if I download House-Intern and there is Traefik in between as well. @j0nnymoe

j0nnymoe commented 10 months ago

so it works for you internally but not externally?

Svenum commented 10 months ago

Yes thats right. I tryed over Cloudflare Tunnel and straight via port forwarding over my router. Both dont work

drizuid commented 9 months ago

If it works internally, the issue isn't our container. If the problem were a container issue, it would present both internally and externally, not just externally. Closing this as not reproducible.

Svenum commented 9 months ago

After a quick test where i Set the download speed low I found out that this problem appears on local network too. The timeout appears to be 45sec. @drizuid

Svenum commented 9 months ago

Now I have tested on the Docker-Host where Nextcloud runs on and it does not work either. @drizuid. So can you Reopen this Issue? Now I have tested the fail-timeout and it is always 45sec

j0nnymoe commented 9 months ago

I'm not able to replicate your issue using our container + going through swag. image

Couple of comments:

Svenum commented 9 months ago

Sorry everything is my fault. I have set a timeout in the depth of my treafik config. Sry Sry Sry. Despite everything, thank you very much for your help :)