Downloads over 1GB simply stop

So Here’s my setup.

I have Proxmox hosting a ubuntu 22.04 LXC (container) and ive installed Seafile on it. (i have another LXC that i run nginx proxy manager, to manage the SSL certs and a one stop shop in terms of setting up proxies).

The server (cloud[dot]mydomain[dot]pt) works great, ive uploaded / synced a lot of files to it from my main server and can download and upload at will. but ANYTHING above 1gb, ive hitting a wall where it just “stops”, no matter the browser. (ive made changes, as you’ll see in the files)

Heres my /opt/seafile/conf/seafile.conf , my /etc/nginx/sites-enabled/seafile.conf and my reverse proxy machine settings

/opt/seafile/conf/seafile.conf

log_format seafileformat '$http_x_forwarded_for $remote_addr [$time_local] "$request" $>

server {
    listen 80;
    server_name seafile.example.com;

    proxy_set_header X-Forwarded-For $remote_addr;

    location / {
         proxy_pass         http://127.0.0.1:8000;
         proxy_set_header   Host $http_host;
         proxy_set_header   X-Real-IP $remote_addr;
         proxy_set_header   X-Forwarded-For $proxy_add_x_forwarded_for;
         proxy_set_header   X-Forwarded-Host $server_name;
         proxy_set_header   X-Forwarded-Proto $scheme;
         proxy_read_timeout  120000s;
         add_header Cache-Control "no-cache";
         # used for view/edit office file via Office Online Server
	 client_max_body_size 0;

         access_log      /var/log/nginx/seahub.access.log seafileformat;
         error_log       /var/log/nginx/seahub.error.log;
    }

    location /seafhttp {
         rewrite ^/seafhttp(.*)$ $1 break;
         proxy_pass http://127.0.0.1:8082;
         client_max_body_size 0;
         proxy_set_header   X-Forwarded-For $proxy_add_x_forwarded_for;
         proxy_connect_timeout  3600000s;
         proxy_read_timeout  3600000s;
         proxy_max_temp_file_size 0;
         proxy_buffering off;

        access_log      /var/log/nginx/seafhttp.access.log seafileformat;
	error_log       /var/log/nginx/seafhttp.error.log;
    }
    location /notification/ping {
        proxy_pass http://127.0.0.1:8083/ping;
        access_log      /var/log/nginx/notification.access.log seafileformat;
        error_log       /var/log/nginx/notification.error.log;
    }
    location /notification {
        proxy_pass http://127.0.0.1:8083/;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
        access_log      /var/log/nginx/notification.access.log seafileformat;
        error_log       /var/log/nginx/notification.error.log;
    }
    location /media {
        root /opt/seafile/seafile-server-latest/seahub;
    }
location /seafdav {
        proxy_pass         http://127.0.0.1:8080/seafdav;
        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_set_header   X-Forwarded-Host $server_name;
        proxy_set_header   X-Forwarded-Proto $scheme;
        proxy_read_timeout  120000s;
        proxy_max_temp_file_size 0;
        proxy_buffering off;
        client_max_body_size 0;

        access_log      /var/log/nginx/seafdav.access.log seafileformat;
        error_log       /var/log/nginx/seafdav.error.log;
    }
}

/etc/nginx/sites-enabled/seafile.conf

[fileserver]
port = 8082
max_download_dir_size = 2500000

[database]
type = mysql
host = 127.0.0.1
port = 3306
user = seafile
password = [REDACTED]
db_name = seafile_db
connection_charset = utf8

[notification]
enabled = false
host = 127.0.0.1
port = 8083
log_level = info
jwt_private_key = [REDACTED]

I’ve just tested , downloading via the local ip, and the results are the same, hence i BELIEVE it might be a issue with the config on the /etc/nginx/sites , or opt/ and not a issue with the NPM (nginx proxy manager)

Another test - different network and computer / browser - results prevail

If it’s a problem with nginx, it ought to present you with a clue in its error logs. Is there really nothing to go by at all in the logs?

I would assume those would be the /var/log/nginx ones?

The only thing im seeing is the GET request, working properly in seafhttp.access.log

[MYWANIP] [NGINXPROXYMANAGERIP] [05/Jun/2024:20:35:06 +0000] "GET /seafhttp/files/b3f83dba-98fa-4cfb-9c1f-453b5fbf3f07/kali-linux-2019.4-amd64.iso HTTP/1.1" 200 1082263264 "h
ttps://[MYSUBDOMAIN].[MYDOMAIN].pt/library/7e3abbc8-d765-455b-a4dc-f08154dfd8c3/Install%20Apps/Sistemas%20Operativos" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHT
ML, like Gecko) Chrome/125.0.0.0 Safari/537.36" 75.361

I’ve found the solution.

The problem was indeed in NPM settings. (even adding this directly in /etc/nginx/sites-enabled did not do it, only adding it on the NPM)

in NPM gui> advanced i’ve added this comments

proxy_max_temp_file_size 0;

Thats LITERALLY it

Tested with 1.5gb, 2.8gb, 5.3gb - its working flawlessly

1 Like