Uploads through Seahub stall after time

Hey there,

I had the need to quickly transfer three 20GB files over from dropbox to my self hosted seafile instance. I fired up an EC2 instance on AWS, downloaded the files from dropbox and started uploading them to seafile using an upload link. Each upload started with around 500 Mbit/s speed but started to stall progressively until it reached around 40-60 Mbit/s and stuck there. When cancelling the upload and restarting it, Seahub resumed the file and the same thing happened again.

What might be the issue here?

Thanks!

Hope the following can help based on our AI analysis (manually checked):

Based on your description, the progressive drop in upload speed from 500 Mbit/s to 40-60 Mbit/s is a common behavior when a component in the data path is buffering the upload or hitting a performance ceiling. Since you are running this on AWS EC2, here are the most likely causes and solutions:

1. Disable Nginx Request Buffering (Most Likely)

By default, Nginx often tries to buffer the entire request body (your 20GB file) to disk before passing it to the Seafile backend. As the buffer fills up or hits disk I/O limits, the speed will “stall” or drop significantly.

You should ensure that buffering is disabled in your Nginx configuration. Check your nginx.conf (specifically the location / or location /seafhttp blocks) for the following settings:

proxy_request_buffering off;
proxy_buffering off;
client_max_body_size 0;

Disabling proxy_request_buffering allows the data to stream directly to Seafile’s fileserver without being cached by Nginx first.

2. Check AWS EC2/EBS Burst Credits

Since you are using EC2, this behavior is a classic symptom of Burst Credit exhaustion:

  • EBS Throttling: If your instance uses an EBS volume (like gp2 or gp3) with low baseline IOPS, it will perform at high speeds until its “burst bucket” is empty, then throttle down to the baseline speed.
  • Network Throttling: Smaller instance types (T2/T3) have “Network Burst” limits. You may be exhausting your network credits during the initial 500 Mbit/s burst.

Troubleshooting: Check your AWS CloudWatch metrics for BurstBalance (for EBS) or NetworkIn throttling. If you are hitting these limits, you may need a larger instance type or an EBS volume with higher provisioned throughput.

3. Adjust Timeouts

Large uploads that take a long time can sometimes be interrupted or throttled if timeouts are too aggressive. Ensure your Nginx timeouts are sufficient for 20GB transfers:

proxy_read_timeout 36000s;
proxy_send_timeout 36000s;
send_timeout 36000s;

4. Recommendation: Use the Seafile Desktop Client

For 20GB files, uploading via a web browser (Seahub) is generally less reliable than using the Seafile Desktop Sync Client. The client splits files into smaller blocks and is much better at handling high-latency or high-bandwidth connections than a standard browser POST upload.

I would recommend trying the Nginx buffering fix first, as that is the most frequent culprit for “stalling” uploads in Seafile.