Seafile Pro 11.0 - Large EML uploads take ~128 seconds while ZIP files of same size take ~3 seconds

Hi,

I’m facing a very strange performance issue with large EML files and would like to know if anyone has seen something similar.

Environment

  • Seafile Pro 11.0 Docker deployment

  • Docker image:

  • Nginx reverse proxy

  • MariaDB 10.11

  • Memcached 1.6.18

  • Classic fileserver (not Go fileserver)

Controller log shows:

Config [fileserver, use_go_fileserver] not set, default is FALSE.

Current seafile.conf:

INI

[fileserver]

port = 8082

[database]

type = mysql

host = db

port = 3306

[notification]

enabled = false

Current seafevents.conf:

INI

[INDEX FILES]

external_es_server = true

enabled = true

index_office_pdf = true

Storage backend is GlusterFS.


Problem

Large EML files upload successfully but require a very long time to complete.

Small EML files upload normally.

The issue only appears with large EML files.


Test file

a.eml

Size: 21 MB

File characteristics:

multipart/mixed

multipart/alternative

Content-Transfer-Encoding: quoted-printable

Content-Transfer-Encoding: base64

Only one attachment:

Content-Disposition count = 1

No nested:

message/rfc822

parts.


Reproduced directly on the Seafile server

To eliminate Java, Windows, network and client-side issues, I executed uploads directly from the Seafile host using curl and a valid upload-link.

ZIP upload

I compressed the EML and added additional files until the ZIP size was approximately the same (around 20 MB).

Shell

time curl -k …

Result:

Plain Text

HTTP=200

TOTAL=3.33 seconds

EML upload

Shell

time curl -k …

Result:

Plain Text

HTTP=200

TOTAL=128.33 seconds

Same server. Same upload-api. Same destination folder. Same network. Same Seafile instance.

Only the file content differs.


Additional observations

Using curl verbose mode I can see:

HTTP/1.1 100 Continue

and later:

We are completely uploaded and fine

which suggests the entire file has already been transmitted.

The delay seems to happen after the upload body has been fully received and before the final response is returned.

The upload eventually succeeds and returns:

JSON

[

{

“name”: “a.eml”,

“id”: “…”,

“size”: 21292776

}

]


Troubleshooting already performed

No improvement after:

  • Disabling CrowdStrike Falcon

  • Disabling Cribl Edge

  • Setting:

Nginx Config

proxy_request_buffering off;

  • Uploading from the Seafile server itself using curl

  • Renaming the EML to .bin

Results remain essentially the same.


Question

Has anyone observed Seafile Pro 11 spending a very long time processing large EML/MIME files after the upload has already completed?

Is there any known post-upload processing, MIME inspection, metadata extraction, indexing or other internal operation that could explain:

21 MB ZIP → 3 seconds

21 MB EML → 128 seconds

Thanks in advance for any ideas or pointers.


If there are any debug logs or internal tracing options I can enable to identify what Seafile is doing during those 128 seconds, please let me know.

21 MB ZIP → 3 seconds

21 MB EML → 128 seconds

Zip files and EML files are handled in the same way by seafile server. So in theory the processing time should be same.

Thanks for the clarification.

That is exactly why I find this behavior so surprising.

If ZIP and EML are processed identically by the Seafile upload pipeline, I would expect similar upload completion times when file sizes are comparable.

In my tests, performed directly from the Seafile host using curl and the same upload API:

  • ZIP (~21 MB): ~3 seconds

  • EML (~21 MB): ~128 seconds

Both uploads return HTTP 200 and complete successfully: We are completely uploaded and fine

long before the final response is returned, which suggests the request body has already been fully transmitted and received by the server.

Because of that, it seems the additional ~125 seconds are being spent somewhere after the upload stream has been received.

To further rule out filename or extension based handling, I also renamed the same EML file to .bin and observed essentially the same behavior.

Given these results, do you know of any component outside the core upload path that could still inspect or process file contents after upload completion?

For example:

  • Full-text indexing

  • Elasticsearch integration

  • Preview/metadata extraction

  • MIME/content detection

  • Antivirus scanning integrations

  • Any asynchronous task that the upload API waits on before returning

Also, is there any debug logging or tracing that could help identify what Seafile is doing during that ~125 second period?

At the moment the evidence seems to indicate that the delay is related to the file content itself rather than its size or the network transfer.

Any log I can inspect?

Regards

The following answer is from our internal AI that can help to investigate the issue (which I have checked):

To clarify how post-upload processing works in Seafile and what might be happening during that period:

1. Post-upload inspection components

  • Full-text indexing & Elasticsearch: These tasks run completely asynchronously via seafevents on a scheduled interval (configured by interval under [INDEX FILES], default 10 minutes). They do not run synchronously during an upload and will not block the upload API response.
  • Preview & Metadata Extraction: Like indexing, preview generation and background metadata tasks are handled asynchronously by background workers, not within the upload request cycle.
  • Antivirus scanning: Antivirus scans are handled asynchronously by default. They only block the upload API synchronously if check_virus_on_web_upload = true is explicitly configured under [fileserver] in seafile.conf.
  • MIME / Content inspection: The Seafile fileserver does not perform deep MIME inspection or content parsing based on file contents.

2. Core upload pipeline & storage commits

Once curl reports We are completely uploaded and fine, the payload transfer to the fileserver’s temporary directory (httptemp) has completed. At that stage, the fileserver performs the following before returning the HTTP 200 response:

  1. Divides the file into fixed-size blocks (default 8 MB in classic fileserver, configured by fixed_block_size).
  2. Calculates cryptographic checksums for the blocks.
  3. Commits the blocks to the storage backend (in your case, GlusterFS) and updates the repository metadata.

A common reason for significant duration differences between file types of identical size is deduplication:

  • If blocks from previous uploads or test files already exist in Seafile’s block storage, existing blocks are skipped without writing to backend storage.
  • If the EML contains novel blocks, all blocks must be written and fsynced across the GlusterFS volume. GlusterFS write performance and network/lock latency can introduce substantial overhead during block commits.

3. Logs and tracing options

To pinpoint where the fileserver spends the ~125 seconds:

  • Fileserver access log: Enable request processing time tracking in seafile.conf:

    [fileserver]
    enable_access_log = true
    

    Restart Seafile. This writes fileserver-access.log recording request processing duration (start time - user id - url - response code - process time).

  • Slow RPC log: Enable slow RPC logging in seafile.conf to check if seaf-server RPC operations are exceeding thresholds:

    [slow_log]
    enable_slow_log = true
    rpc_slow_threshold = 5000
    

    Slow queries will be written to logs/slow_logs/seafile_slow_rpc.log.

  • Check core logs: Inspect seafile.log and fileserver.log in your logs directory for any errors, warnings, or retries occurring during the upload window.

  • System call tracing: Because you are using the classic fileserver, attach strace to the running fileserver process while reproducing the curl upload:

    strace -tt -T -f -p <fileserver_pid> -o /tmp/fileserver_strace.log
    

    Checking the system calls with large execution times (<time> at the end of each trace line) will reveal whether the delay is spent on GlusterFS file writes/syncs (write, fsync), socket operations, or locking.

Thanks. I repeated the test in our pre-production environment, with no concurrent migration activity, and attached strace to the classic seaf-server process.

The EML upload took:

HTTP=200
TOTAL=214.001502 seconds

The trace produced an interesting result. I did not find any slow write, fsync, rename, block-storage or GlusterFS operation.

Instead, the relevant sequence was:

10:18:48.237528 epoll_wait resumed after 215.189216 seconds
10:18:48.237047 accept4(... 127.0.0.1 ...)
10:18:48.238102 readv(... "POST /upload-api/..." ...)
10:18:48.683208 writev(... "HTTP/1.0 200 OK" ...)

This seems to show that the Seafile fileserver was idle and waiting during almost the entire upload duration.

Once the connection from 127.0.0.1 was accepted and the fileserver started reading the POST request, Seafile processed it and returned HTTP 200 in approximately 0.45 seconds.

Therefore, the delay does not appear to occur during Seafile block creation, checksum calculation, GlusterFS commit or repository metadata update. It appears to happen before the upload request reaches the Seafile fileserver.

This points to Nginx or another reverse-proxy/request-buffering layer. I had already configured:

proxy_request_buffering off;

but the trace suggests that the request may still be fully buffered before being forwarded to the fileserver, or that this directive is not being applied to the effective /seafhttp/upload-api/ location.

I will now verify the effective Nginx configuration and its temporary request-body paths.

Is this interpretation correct based on the trace? Are there any specific Nginx locations or generated configuration files in the Docker deployment that I should check for the Seafile upload API?

Thanks. I have done some additional tests and I think I can now rule out Nginx and the external network.

I copied both test files inside the Seafile container and uploaded them directly to the classic fileserver on 127.0.0.1:8082, completely bypassing Nginx, HTTPS, external networking and the client machine.

Direct EML upload:

127.0.0.1:8082/upload-api/…

HTTP=200

TOTAL=157.908784

Direct ZIP upload:

127.0.0.1:8082/upload-api/…

HTTP=200

TOTAL=4.279517

Both files are approximately the same size (~21 MB), are uploaded to the same repository/directory, through the same upload API, from inside the same container, directly to the same seaf-server process.

So the difference is approximately 37x, even when Nginx is completely removed from the path.

I also tested proxy_request_buffering off, but the EML remained slow, which is consistent with the direct 8082 test showing that Nginx is not the cause.

This leaves me puzzled by the earlier statement that ZIP and EML files are handled identically by the Seafile server, because the behavior is clearly reproducible based on the file content:

~21 MB EML → 157.9 s

~21 MB ZIP → 4.3 s

I also ran strace against seaf-server. I did not find an individual slow write, fsync, rename, or other obvious GlusterFS filesystem operation that corresponds to the ~150 second delay.

Given that this can now be reproduced directly against 127.0.0.1:8082, is there a more specific debug option for the classic fileserver that would show the different stages of upload-api processing (receiving the temporary file, block indexing/checksum calculation, block existence checks, block writes and commit creation)?

I would be particularly interested in identifying exactly which stage takes ~150 seconds for the EML but only ~4 seconds for the ZIP.

Please first upgrade to Seafile 13.0 before conducting further investigation.

Starting with Seafile 13.0, the Go fileserver is used by default instead of the classic seaf-server fileserver, which includes substantial architecture improvements and may resolve or alter the behavior observed in your current setup. Additionally, the reverse proxy and Nginx architecture has changed significantly between version 11.0 and 13.0. Once upgraded to 13.0, please let us know if the issue persists.

Thanks for your answer, at the momment I can´t upgrade to version 13, so a I would like to solve this issue in version 11. I don´t know if someone has had the same behaviour…

I think I have finally isolated the issue.

Before upgrading to Seafile 13, I performed one additional test because our /shared volume is hosted on GlusterFS.

I kept all persistent Seafile storage on GlusterFS:

storage/blocks   -> GlusterFS
storage/fs       -> GlusterFS
storage/commits  -> GlusterFS

but mounted only:

/shared/seafile/seafile-data/httptemp

on the Seafile server’s local XFS filesystem.

The difference is dramatic.

With httptemp on GlusterFS:

EML ~21 MB -> 146-178 seconds
ZIP ~22 MB -> ~4.3 seconds

With httptemp on local XFS:

EML ~21 MB -> 1.19 seconds
ZIP ~22 MB -> 0.16 seconds

I also repeated the original HTTPS upload through Nginx:

EML ~21 MB
HTTP=200
TOTAL=1.223978 seconds

So the problem appears to be specifically related to the classic fileserver using httptemp on GlusterFS. The final Seafile block/fs/commit storage is still on GlusterFS.

This also explains why changing Nginx buffering, bypassing Nginx, disabling endpoint/security agents, renaming the EML, etc. did not solve it.

Would you consider it safe and supported to keep httptemp on local storage permanently while keeping storage/blocks, storage/fs and storage/commits on GlusterFS?

In our Docker deployment this is currently done with:

- /mnt/gluster/seafile-data:/shared
- /opt/seafile-local/httptemp:/shared/seafile/seafile-data/httptemp

If this configuration is supported, it would completely resolve the issue in our current Seafile 11 deployment.

Yes, keeping httptemp on fast local storage while retaining storage/blocks, storage/fs, and storage/commits on GlusterFS is safe, supported.

Thanks for the help!!