File uploads pausing and resuming/choppy using desktop client through reverse proxy

The Basics

  • Nextcloud Server version:
    • 30.0.2
  • Operating system and version_:
    • Ubuntu 22.04 - Docker Container (linuxserver/nextcloud)
  • Web server and version:
    • Nginx (don't know version)
  • Reverse proxy and version
    • Nginx (don't know version)
  • PHP version:
    • 8.3.13
  • Is this the first time you’ve seen this error? (Yes / No):
    • No
  • When did this problem seem to first start?
    • Since install
  • Installation method (e.g. AIO, NCP, Bare Metal/Archive, etc.)
    • Docker Container
  • Are you using Cloudflare, mod_security, or similar? (Yes / No)
    • No

Summary of the issue you are facing:

When upload files through the desktop client application routing through my reverse proxy, file uploads are choppy and not consistent. This is a new install I’m setting up and I’m testing with large files and it seems every 800MB’s roughly the upload pauses for 15-30 seconds then resumes again and pauses again back and forth until the file is uploaded. Routing straight to my nextcloud server without reverse proxy it’s much more consistent. Upload speeds still vary but it doesn’t completely cut out for 30 seconds. I’ve tried turning proxy buffering on and off in my reverse proxy configuration and same results either way. I will attach screenshots of the interface traffic showing the gaps in between pauses and then not bypassing reverse proxy.
This is using the reverse proxy
Screenshot 2024-11-15 175417
This is going directly to IP of Nextcloud server
Screenshot 2024-11-15 181512

Steps to replicate it (hint: details matter!):

  1. Start syncing/uploading large file in nextcloud desktop client
  2. Progresses as fast speed to about 850MB then pauses for 30 seconds and resumes as fast speed again.
  3. This pattern goes until file is done uploading and sync successfully completes

Configuration

Nextcloud

<?php
$CONFIG = array (
  'datadirectory' => '/data',
  'instanceid' => 'removed',
  'passwordsalt' => 'removed',
  'secret' => 'removed',
  'trusted_domains' =>
  array (
    0 => 'hidden',
    1 => 'hidden',
  ),
  'trusted_proxies' =>
  array (
    0 => 'hidden',
  ),
  'dbtype' => 'mysql',
  'version' => '30.0.2.2',
  'overwrite.cli.url' => 'hidden',
  'overwritehost' => 'hidden',
  'overwriteprotocol => 'https',
  'dbname' => 'hidden',
  'dbhost' => 'hidden',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'hidden',
  'dbpassword' => 'hidden',
  'installed' => true,
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'filelocking.enabled' => true,
  'memcache.locking' => '\\OC\\Memcache\\APCu',
  'upgrade.disable-web' => true,
  'mail_smtpmode' => 'smtp',
  'mail_sendmailmode' => 'smtp',
  'mail_from_address' => 'noreply',
  'mail_domain' => 'hidden',
  'mail_smtphost' => 'hidden',
  'mail_smtpport' => '587',
  'mail_smtpauth' => 1,
  'mail_smtpname' => 'hidden',
  'mail_smtppassword' => 'hidden',
  'default_phone_region' => 'US',
  'maintenance_window_start' => 1,
  'maintenance' => false,
  'loglevel' => 0,
);


Nextcloud Nginx Config:

## Version 2024/07/16 - Changelog: https://github.com/linuxserver/docker-nextcloud/commits/master/root/defaults>

# Set the `immutable` cache control options only for assets with a cache busting `v` argument
map $arg_v $asset_immutable {
    "" "";
    default "immutable";
}

server {
    listen 80 default_server;
    listen [::]:80 default_server;
    listen 443 ssl default_server;
    listen [::]:443 ssl default_server;

    server_name _;

    include /config/nginx/ssl.conf;

    root /app/www/public;

    # display real ip in nginx logs when connected through reverse proxy via docker network
    set_real_ip_from hidden;
    real_ip_header X-Forwarded-For;

    # https://docs.nextcloud.com/server/latest/admin_manual/installation/nginx.html#nextcloud-in-the-webroot-of>

    # set max upload size and increase upload timeout:
    client_max_body_size 0;
    client_body_timeout 3600s;
    fastcgi_buffers 64 4K;
    fastcgi_read_timeout 3600s;
    # Enable gzip but do not remove ETag headers
    gzip on;
    gzip_vary on;
    gzip_comp_level 4;
    gzip_min_length 256;

Nginx Reverse Proxy Headers Config:

location / {
                # Security headers
                add_header Strict-Transport-Security "max-age=31536000; 
                includeSubDomains; preload";
                add_header X-Frame-Options DENY;
                add_header X-Content-Type-Options nosniff;
                add_header X-XSS-Protection "1; mode=block";
                add_header Referrer-Policy "origin";
                proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
                proxy_set_header X-Forwarded-Port $server_port;
                proxy_set_header X-Forwarded-Scheme $scheme;
                proxy_set_header X-Forwarded-Proto $scheme;
                proxy_set_header X-Real-IP $remote_addr;
                proxy_set_header Accept-Encoding "";
                proxy_set_header Host $host;
                proxy_max_temp_file_size 50000m;
                client_max_body_size 0;
                proxy_read_timeout 3600s;

                # Websocket
                proxy_http_version 1.1;
                proxy_set_header Upgrade $http_upgrade;
                proxy_set_header Connection "upgrade";
                proxy_pass hidden;
        }

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.