Slow upload (Nginx)

I have 100/100mb conexion in my server, but when I upload the speed doesn’t exceed 600-800kb/s

This is my conf. file:

        listen 80;
        rewrite ^ https://$http_host$request_uri? permanent;
        proxy_set_header X-Forwarded-For $remote_addr;
        listen 443 ssl; # managed by Certbot
        ssl_certificate /etc/letsencrypt/live/; # managed by Certbot
        ssl_certificate_key /etc/letsencrypt/live/; # managed by Certbot
        include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot

       # Redirect non-https traffic to https
       #if ($scheme != "https") {
       #      return 301 https://$host$request_uri;
       #  } # managed by Certbot

      location / {
            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   REMOTE_ADDR         $remote_addr;

            access_log      /var/log/nginx/seahub.access.log;
            error_log       /var/log/nginx/seahub.error.log;
            fastcgi_read_timeout 36000;
            client_max_body_size 0;

        location /seafhttp {
            rewrite ^/seafhttp(.*)$ $1 break;
            client_max_body_size 0;
            proxy_connect_timeout  36000s;
            proxy_read_timeout  36000s;
            proxy_send_timeout  36000s;
            send_timeout  36000s;
            proxy_request_buffering off;

        location /media {
            root /home/xxx/xxx/seafile-server-latest/seahub;

Any solution?


Do you run 6.2.* version of the server? If you do that you should not use fastcgi.

Also, here is some guidelines how to optimize NGINX.

1 Like

Thanks Calby, I’ll try.

I’m sorry, I have done all the steps but the speed is the same. Even so, thank you very much for the reply.

What device are you running seafile on?
What hardware do you have?

also put this in every server block:
proxy_request_buffering off;
client_max_body_size 0;

Seafile pro 6.1.8 on Ubuntu 16.04.
Intel® Xeon® E5-2620v3 (4 cores)
100 Mbit/s port


what kind of HDD?

I use a external cloud storage (google cloud) mounted like a disk drive.

try to test the maximal bandwidth to the cloud transfering by ftp or similar, this way you can have an idea how much could reach seafile.

Make sure to have some local disk space and only store blocks, fs and commits (those are three folders in the storage folder) on the external storage. Depending how much local storage you have you could also store fs and commits completely locally as they don’t need much storage.

And I also recommend what @jobenvil just has written.

Well there’s your issue, you can’t count your own bandwith when your also using a secondary storage (cloud).

You’re right, the máximum speed by ftp is 800-900kbs/s.

@shoeper, I have free space of ssd (300GB), how can I do that?


You can do it by just mounting the Google cloud storage for the blocks folder while keeping everything else locally.

Make sure to include the local data and database in backups.

Ok! I can try. Thank you very much :slight_smile: