Webdav upload (big files)

Hello.

When i try to upload big files (more then 2 Gb) - i have an error (seafdav.log)

\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x01\x01\x00\x00\x01\x00\x08\x08\x00\n'
[2017-11-13 13:49:52,934]:  Traceback (most recent call last):
  File "/opt/seafile/seafile-server-6.2.2/seahub/thirdpart/wsgidav/error_printer.py", line 43, in __call__
    for v in app_iter:
  File "/opt/seafile/seafile-server-6.2.2/seahub/thirdpart/wsgidav/request_resolver.py", line 201, in __call__
    for v in app_iter:
  File "/opt/seafile/seafile-server-6.2.2/seahub/thirdpart/wsgidav/request_server.py", line 113, in __call__
    app_iter = method(environ, start_response)
  File "/opt/seafile/seafile-server-6.2.2/seahub/thirdpart/wsgidav/request_server.py", line 738, in doPUT
    self._fail(e)
  File "/opt/seafile/seafile-server-6.2.2/seahub/thirdpart/wsgidav/request_server.py", line 128, in _fail
    raise e
DAVError: DAVError(500 Internal Server Error: An internal server error occurred
    Source exception: 'invalid literal for int() with base 16: '\x00\x00\x00\x00\x00\x00\x00\x

What does it means and how I can fix it ?

P .S. I have installed seafile-server-6.2.2

Have you changed the upload limit in NGINX or Apache2 configuration?
Have you changed the limit in Seafile.conf?

below are the file nginx.conf

server {
listen 443 ssl http2;
server_name mydomain.com;

    add_header Strict-Transport-Security "max-age=31530000; includeSubDomains";

    add_header X-Frame-Options SAMEORIGIN;

    access_log             /var/log/nginx/access-cloud2.log;
    error_log               /var/log/nginx/error-cloud2.log;

    ssl_certificate         /etc/letsencrypt/live/mydomain.com/fullchain.pem;
    ssl_certificate_key     /etc/letsencrypt/live/mydomain.com/privkey.pem;
    ssl_dhparam             /etc/nginx/ssl/dhparam.pem;

    ssl_stapling on;

    ssl_session_timeout 24h;
    ssl_session_cache shared:SSL:2m;
    ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
    ssl_ciphers kEECDH+AES128:kEECDH:kEDH:-3DES:kRSA+AES128:kEDH+3DES:DES-CBC3-SHA:!RC4:!aNULL:!eNULL:!MD5:!EXPORT:!LOW:!SEED:!CAMELLIA:!IDEA:!PSK:!SRP:!SSLv2;
    ssl_prefer_server_ciphers on;
    add_header Strict-Transport-Security "max-age=31536000;";
    add_header Content-Security-Policy-Report-Only "default-src https:; script-src https: 'unsafe-eval' 'unsafe-inline'; style-src https: 'unsafe-inline'; img-src https: data:; font-src https: data:; report-uri /csp-report";

location / {
proxy_pass http://cloud.home.mydomain.com:8000;
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_read_timeout 1200s;

     # used for view/edit office file via Office Online Server
     client_max_body_size 0;

    }

    location /media {
            root /mnt/cloud_seahub;
    }

    location /seafdav {

            fastcgi_pass                            cloud.home.mydomain.com:1031;
            fastcgi_param   SCRIPT_FILENAME         $document_root$fastcgi_script_name;
            fastcgi_param   PATH_INFO               $fastcgi_script_name;

            fastcgi_param   SERVER_PROTOCOL         $server_protocol;
            fastcgi_param   QUERY_STRING            $query_string;
            fastcgi_param   REQUEST_METHOD          $request_method;
            fastcgi_param   CONTENT_TYPE            $content_type;
            fastcgi_param   CONTENT_LENGTH          $content_length;
            fastcgi_param   SERVER_ADDR             $server_addr;
            fastcgi_param   SERVER_PORT             $server_port;
            fastcgi_param   SERVER_NAME             $server_name;
            fastcgi_param   HTTPS                   on;
            fastcgi_param   HTTP_SCHEME             https;

            client_max_body_size                    0;
            proxy_connect_timeout                   36000s;
            proxy_read_timeout                      36000s;
            proxy_send_timeout                      36000s;
            send_timeout                            36000s;

            # This option is only available for Nginx >= 1.8.0. See more details below.
            proxy_request_buffering                 off;
            proxy_buffering                         off;
            fastcgi_read_timeout                    36000;
            fastcgi_ignore_client_abort             on;

            create_full_put_path                    on;
            dav_methods                             PUT DELETE MKCOL COPY MOVE;
            dav_access                              user:rw group:r all:r;
    }

    location /seafhttp {

            rewrite ^/seafhttp(.*)$                 $1 break;
            proxy_pass                              http://cloud.home.mydomain.com:1030;
            proxy_connect_timeout                   36000s;
            proxy_read_timeout                      36000s;
            proxy_send_timeout                      36000s;
            send_timeout                            36000s;
    
}

}

and the seafile.conf

-bash-4.2$ cat /opt/seafile/conf/seafile.conf
[fileserver]
port = 1030

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

put this in NGINX configuration:
client_max_body_size 0;

Put it in both location /and location /seafhttp block.

In seafile.conf add:
[fileserver]

How long time a session can bee open before it times out.

web_token_expire_time=7200

Max upload size, it’s in MB

max_upload_size=10000

Then restart NGINX and Seafile or reboot your server.

I tried to follow your recommendation and got this error

[2017-11-14 10:34:40,123]: PUT: byte copy failed
Traceback (most recent call last):
File “/opt/seafile/seafile-server-6.2.2/seahub/thirdpart/wsgidav/request_server.py”, line 678, in doPUT
l = int(buf, 16)
ValueError: invalid literal for int() with base 16: "\x1aE\xdf\xa3\xa3B\x86\x81\x01B\xf7\x81\x01B\xf2\x81
x04B\xf3\x81\x08B\x82\x88matroskaB\x87\x81\x02B\x85\x81\x02\x18S\x80g\x01\x00\x00\x01\x12V\xaa\xf1\x11M\x9bt
\xbfM\xbb\x8cS\xab\x84\x15I\xa9fS\xac\x82\x10\x03M\xbb\x8cS\xab\x84\x16T\xaekS\xac\x82\x10\xa1M\xbb\x8fS\xab
\x84\x1cS\xbbkS\xac\x85\x01\x12U\xf0,M\xbb\x8cS\xab\x84\x10C\xa7pS\xac\x82\x17\xaa\xecO\xbc\x00\x00\x00\x00\x
00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00

x00\x00\x00\x00\x00\x00\x00\x15I\xa9f@\x98*\xd7\xb1\x83\x0fB@M\x80\xa3libebml v1.2.3 + libmatroska v1.3.0WA\xc3mkvmerge v5.8.0 (‘No Sleep / Pillow’) built on Sep 2 2012 15:37:04D\x89\x84J
\xd4\xb0\x80Da\x88\x07\x12\x0e\x90\x1e\xbb\xf0\x00s\xa4\x90\xb5\x9aT\x04\x84m1*\x9e\xc0)\t\xb4`0\xc1\x16T\xaekB\x0c\xae\xf6\xd7\x81\x01s\xc5\x88\xac=\xf3\x9b?\xbd\n"
2017-11-14 10:34:40,124: Traceback (most recent call last):
File “/opt/seafile/seafile-server-6.2.2/seahub/thirdpart/wsgidav/error_printer.py”, line 43, in call
for v in app_iter:
File “/opt/seafile/seafile-server-6.2.2/seahub/thirdpart/wsgidav/request_resolver.py”, line 201, in call
for v in app_iter:
File “/opt/seafile/seafile-server-6.2.2/seahub/thirdpart/wsgidav/request_server.py”, line 113, in call
app_iter = method(environ, start_response)
File “/opt/seafile/seafile-server-6.2.2/seahub/thirdpart/wsgidav/request_server.py”, line 738, in doPUT
self._fail(e)
File “/opt/seafile/seafile-server-6.2.2/seahub/thirdpart/wsgidav/request_server.py”, line 128, in _fail
raise e
DAVError: DAVError(500 Internal Server Error: An internal server error occurred
Source exception: 'invalid literal for int() with base 16: "\x1aE\xdf\xa3\

00\x15I\xa9f@\x98*\xd7\xb1\x83\x0fB@M\x80\xa3libebml v1.2.3 + libmatroska v1.3.0WA\xc3mkvmerge v5.8.0 (‘No Sleep / Pillow’) built on Sep 2 2012 15:37:04D\x89\x84J\xd4
xb0\x80Da\x88\x07\x12\x0e\x90\x1e\xbb\xf0\x00s\xa4\x90\xb5\x9aT\x04\x84m1*\x9e\xc0)\t\xb4`0\xc1\x16T\xaekB\x0c\xae\xf6\xd7\x81\x01s\xc5\x88\xac=\xf3\x9b?\xbd\n"’)

invalid literal for int() with base 16: "\x1aE\xdf\xa3\xa3B\x86\x81\x01B\xf7\x81\x01B\xf2\x81

x00\x00\x15I\xa9f@\x98*\xd7\xb1\x83\x0fB@M\x80\xa3libebml v1.2.3 + libmatroska v1.3.0WA\xc3mkvmerge v5.8.0 (‘No Sleep / Pillow’) built on Sep 2 2012 15:37:04D\x89\x84J\xd4\xb0
x80Da\x88\x07\x12\x0e\x90\x1e\xbb\xf0\x00s\xa4\x90\xb5\x9aT\x04\x84m1*\x9e\xc0)\t\xb4`0\xc1\x16T\xaekB\x0c\xae\xf6\xd7\x81\x01s\xc5\x88\xac=\xf3\x9b?\xbd\n"

Can you help me to resolve this problem ?

What version of python you have?
What version of Pillow you have?

python --version
Python 2.7.5
And I don’t know how to check pillow version :frowning:

You are using pip version 8.1.2, however version 9.0.1 is available.
You should consider upgrading via the ‘pip install --upgrade pip’ command.

do I need to upgrade pip ?

Yes you can upgrade, pip is just utility to download python libraries.

pip list | grep "Pillow"

I have installed latest version pillow

[root@cloud-server-2 ~]# pip install --upgrade Pillow
Collecting Pillow
Downloading Pillow-4.3.0-cp27-cp27mu-manylinux1_x86_64.whl (5.8MB)
100% |████████████████████████████████| 5.8MB 118kB/s
Collecting olefile (from Pillow)
Downloading olefile-0.44.zip (74kB)
100% |████████████████████████████████| 81kB 270kB/s
Installing collected packages: olefile, Pillow
Running setup.py install for olefile … done
Found existing installation: Pillow 2.0.0
Uninstalling Pillow-2.0.0:
Successfully uninstalled Pillow-2.0.0
Successfully installed Pillow-4.3.0 olefile-0.44

pip list | grep “Pillow”
DEPRECATION: The default format will switch to columns in the future. You can use --format=(legacy|columns) (or define a format=(legacy|columns) in your pip.conf under the [list] section) to disable this warning.
Pillow (4.3.0)

and I’ve got an error

[2017-11-14 11:47:26,086]: PUT: byte copy failed
Traceback (most recent call last):
File “/opt/seafile/seafile-server-6.2.2/seahub/thirdpart/wsgidav/request_server.py”, line 678, in doPUT
l = int(buf, 16)
ValueError: invalid literal for int() with base 16: ‘3\xed\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x903\xed\xfa\x8e\xd5\xbc\x00|\xfb\xfcf1\xdbf1\xc9fSfQ\x06W\x8e\xdd\x8e\xc5R\xbe\x00|\xbf\x00\x06\xb9\x00\x01\xf3\xa5\xeaK\x06\x00\x00R\xb4A\xbb\xaaU1\xc90\xf6\xf9\xcd\x13r\x16\x81\xfbU\xaau\x10\x83\xe1\x01t\x0bf\xc7\x06\xf1\x06\xb4B\xeb\x15\xeb\x00ZQ\xb4\x08\xcd\x13\x83\xe1?[Q\x0f\xb6\xc6@P\xf7\xe1SRP\xbb\x00|\xb9\x04\x00f\xa1\xb0\x07\xe8D\x00\x0f\x82\x80\x00f@\x80\xc7\x02\xe2\xf2f\x81>@|\xfb\xc0xpu\t\xfa\xbc\xec{\xeaD|\x00\x00\xe8\x83\x00isolinux.bin missing or corrupt.\r\n’
2017-11-14 11:47:26,087: Traceback (most recent call last):
File “/opt/seafile/seafile-server-6.2.2/seahub/thirdpart/wsgidav/error_printer.py”, line 43, in call
for v in app_iter:
File “/opt/seafile/seafile-server-6.2.2/seahub/thirdpart/wsgidav/request_resolver.py”, line 201, in call
for v in app_iter:
File “/opt/seafile/seafile-server-6.2.2/seahub/thirdpart/wsgidav/request_server.py”, line 113, in call
app_iter = method(environ, start_response)
File “/opt/seafile/seafile-server-6.2.2/seahub/thirdpart/wsgidav/request_server.py”, line 738, in doPUT
self._fail(e)
File “/opt/seafile/seafile-server-6.2.2/seahub/thirdpart/wsgidav/request_server.py”, line 128, in _fail
raise e
DAVError: DAVError(500 Internal Server Error: An internal server error occurred
Source exception: ‘invalid literal for int() with base 16: ‘3\xed\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x903\xed\xfa\x8e\xd5\xbc\x00|\xfb\xfcf1\xdbf1\xc9fSfQ\x06W\x8e\xdd\x8e\xc5R\xbe\x00|\xbf\x00\x06\xb9\x00\x01\xf3\xa5\xeaK\x06\x00\x00R\xb4A\xbb\xaaU1\xc90\xf6\xf9\xcd\x13r\x16\x81\xfbU\xaau\x10\x83\xe1\x01t\x0bf\xc7\x06\xf1\x06\xb4B\xeb\x15\xeb\x00ZQ\xb4\x08\xcd\x13\x83\xe1?[Q\x0f\xb6\xc6@P\xf7\xe1SRP\xbb\x00|\xb9\x04\x00f\xa1\xb0\x07\xe8D\x00\x0f\x82\x80\x00f@\x80\xc7\x02\xe2\xf2f\x81>@|\xfb\xc0xpu\t\xfa\xbc\xec{\xeaD|\x00\x00\xe8\x83\x00isolinux.bin missing or corrupt.\r\n’’)

invalid literal for int() with base 16: ‘3\xed\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x903\xed\xfa\x8e\xd5\xbc\x00|\xfb\xfcf1\xdbf1\xc9fSfQ\x06W\x8e\xdd\x8e\xc5R\xbe\x00|\xbf\x00\x06\xb9\x00\x01\xf3\xa5\xeaK\x06\x00\x00R\xb4A\xbb\xaaU1\xc90\xf6\xf9\xcd\x13r\x16\x81\xfbU\xaau\x10\x83\xe1\x01t\x0bf\xc7\x06\xf1\x06\xb4B\xeb\x15\xeb\x00ZQ\xb4\x08\xcd\x13\x83\xe1?[Q\x0f\xb6\xc6@P\xf7\xe1SRP\xbb\x00|\xb9\x04\x00f\xa1\xb0\x07\xe8D\x00\x0f\x82\x80\x00f@\x80\xc7\x02\xe2\xf2f\x81>@|\xfb\xc0xpu\t\xfa\xbc\xec{\xeaD|\x00\x00\xe8\x83\x00isolinux.bin missing or corrupt.\r\n’

What’s wrong ?

Sorry but I cannot find problem. It seems like you have some problem in system. For example isolinux.bin missing or corrupt looks very bad and I don’t think it have some relation to seafile. Maybe wait for some who have experience with this problem.

after I used the solution proposed at the link https://github.com/haiwen/seafdav/pull/12/files I’ve got an error

tail -f /opt/seafile/logs/seafdav.log
self._fail(e)
File “/opt/seafile/seafile-server-6.2.2/seahub/thirdpart/wsgidav/request_server.py”, line 128, in _fail
raise e
DAVError: DAVError(500 Internal Server Error: An internal server error occurred
Source exception: ‘’)

[2017-11-14 13:05:22,004]: Input stream not completely consumed: closing connection
[2017-11-14 13:05:22,004]: Adding ‘Connection: close’ header

now when downloading large files via webdav appears here such error

2017-12-02 23:10:21,108: PUT: byte copy failed
Traceback (most recent call last):
File “/opt/seafile/seafile-server-6.2.2/seahub/thirdpart/wsgidav/request_server.py”, line 716, in doPUT
assert contentlength > 0
AssertionError
2017-12-02 23:10:21,108: Traceback (most recent call last):
File “/opt/seafile/seafile-server-6.2.2/seahub/thirdpart/wsgidav/error_printer.py”, line 43, in call
for v in app_iter:
File “/opt/seafile/seafile-server-6.2.2/seahub/thirdpart/wsgidav/request_resolver.py”, line 201, in call
for v in app_iter:
File “/opt/seafile/seafile-server-6.2.2/seahub/thirdpart/wsgidav/request_server.py”, line 113, in call
app_iter = method(environ, start_response)
File “/opt/seafile/seafile-server-6.2.2/seahub/thirdpart/wsgidav/request_server.py”, line 738, in doPUT
self._fail(e)
File “/opt/seafile/seafile-server-6.2.2/seahub/thirdpart/wsgidav/request_server.py”, line 128, in _fail
raise e
DAVError: DAVError(500 Internal Server Error: An internal server error occurred
Source exception: ‘’)

can anyone help to solve this problem ?

Really nobody uses webdav to work with files over 2 Gb? For example: file synchronization on the smartphone and the server seafile.

I do, but did not run in and issues other than it is slow.