Upload of files larger than 1 MB not working

Hello!

I’m experiencing the following problem with a Seafile installation via Docker (Version 8.0.5) on a Debian 10 server with NginX as a reverse proxy:

When I try to upload a file larger than 1 MB via the web interface, the upload progress bar stops growing at a certain point and the upload rate drops to 0,00 B/s and stays there. From this point on, nothing more happens. When I reload the page, the upload progress bar does not appear again and I see that the file has not been uploaded.

With files smaller than 1 MB, the uploads work just fine.

I know that files are stored in 1 MB blocks by default, so maybe there is a problem with the mechanism which creates the blocks?

Is there a log file where I can look for logs regarding the block storage?

Can someone help me get it to work properly?

This is my docker-compose.yml:

version: ‘2.0’
services:
db:
image: mariadb
container_name: seafile-mysql
environment:
- MYSQL_ROOT_PASSWORD=[my secret password which I won’t post here]
- MYSQL_LOG_CONSOLE=true
volumes:
- . / data / mariadb : / var / lib / mysql (without the spaces)
networks:
- seafile-net

memcached:
image: memcached
container_name: seafile-memcached
entrypoint: memcached -m 256
networks:
- seafile-net

seafile:
image: seafileltd/seafile-mc
container_name: seafile
ports:
- “8822:80”
volumes:
- ./data/app:/shared
environment:
- DB_HOST=db
- DB_ROOT_PASSWD=[secret password]
- TIME_ZONE=Europe/Berlin
- SEAFILE_ADMIN_EMAIL=[secret email address]
- SEAFILE_ADMIN_PASSWORD=[secret password]
- SEAFILE_SERVER_LETSENCRYPT=false
- SEAFILE_SERVER_HOSTNAME=[secret hostname]
depends_on:
- db
- memcached
networks:
- seafile-net

networks:
seafile-net:

This is my seahub_settings.py:

-- coding: utf-8 --

SECRET_KEY = [some secret key]

DATABASES = {
‘default’: {
‘ENGINE’: ‘django.db.backends.mysql’,
‘NAME’: ‘seahub_db’,
‘USER’: ‘seafile’,
‘PASSWORD’: [secret password],
‘HOST’: ‘db’,
‘PORT’: ‘3306’
}
}

CACHES = {
‘default’: {
‘BACKEND’: ‘django_pylibmc.memcached.PyLibMCCache’,
‘LOCATION’: ‘memcached:11211’,
},
‘locmem’: {
‘BACKEND’: ‘django.core.cache.backends.locmem.LocMemCache’,
},
}
COMPRESS_CACHE_BACKEND = ‘locmem’
TIME_ZONE = ‘Europe/Berlin’
FILE_SERVER_ROOT = [a secret URL]

This is my ccnet.conf:

[General]
SERVICE_URL = [secret URL]
[Database]
ENGINE = mysql
HOST = db
PORT = 3306
USER = seafile
PASSWD = [secret password]
DB = ccnet_db
CONNECTION_CHARSET = utf8

[Client]
UNIX_SOCKET = /opt/seafile/ccnet.sock

This is my NginX config file for Seafile:

server {
server_name [secret server name];
location / {
proxy_pass http : // localhost : 8822; (without the spaces)
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}

listen [::]:443 ssl; # managed by Certbot
listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/[my secret hostname]/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/[my secret hostname]/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot

}
server {
if ($host = [my secret hostname]) {
return 301 https : // $host $request_uri; (without the spaces)
} # managed by Certbot

server_name [my secret hostname];

listen 80;
listen [::]:80;
return 404; # managed by Certbot
}

This is my first post in any tech-related forum, so please let me know if any info is missing or if I did not follow best practice.

Any help would be greatly appreciated!
Thanks in advance!

Clemens Holzapfel

Nginx by default has this 1MB limit. You can change that limit by adding this line (here I set to 0 to remove the limit completely):
client_max_body_size 0;

That would go in the “location” block, so you could put it right under the “proxy_set_header” line, and then restart nginx.

Yes!
This solved it. Thank you SO much!