Edit history

[Self-Hosted?] Default Seaweedfs's Memory Limits causes it's OOM while uploading moderately big files has not been edited, so there are no earlier versions.

Current version | Original by Rex
Show

[Self-Hosted?] Default Seaweedfs's Memory Limits causes it's OOM while uploading moderately big files

Observed behaviour

Memory limits introduced in ab08ed0d and then updated in c982b332 are still not sane. In my case, upload of 170mb~ video had 85%~ chance to cause OOM of seaweedfs's container. Additionally, this failmode causes ballooning of space used by seaweedfs (users don't understand why their file won't upload and try again and again till it does (if even possible)) and there is no infrastructure to clean up these (as far as I can tell) corrupted files/volumes. Even though docs have this mention of FLUXER_SEAWEEDFS_MEMORY_LIMIT variable I still believe that this is a bug, as docs don't mention that "not changing this variable after changing Maximum eligible size will make your file upload unusable". I believe that GUI admin settings ('Maximum eligible size') should NOT lead to silent fails of functionality, especially without any form of warning before doing so. 2gb~ sounds like a good middle ground. I would (well I tired) open a pull with this trivial 'fix', but I can't (_only approved contributors may submit pull requests_) (unfortunately).

Reproduction steps

  1. Set up your Fluxer instance.
  2. Set 'Maximum eligible (upload) size' to 200mb or more.
  3. Try to upload file bigger than 190mb~ (it depends, may be less).
  4. Get seaweed OOMed after big file upload:
    [Sun Sep  6 20:23:56 2026] Memory cgroup out of memory: Killed process 3402 (weed) total-vm:2556184kB, anon-rss:509644kB, file-rss:2560kB, shmem-rss:0kB, UID:1000 pgtables:2436kB oom_score_adj:0
    ....
    [Sun Sep  6 21:35:55 2026] Memory cgroup out of memory: Killed process 645584 (weed) total-vm:2557208kB, anon-rss:511444kB, file-rss:77568kB, shmem-rss:0kB, UID:1000 pgtables:2424kB oom_score_adj:0
    

Build information

Stable Web 2026.906.210253, Linux (x86), Chrome 152.0.0.0, Locale en-GB

Platform

Self-hosting

Evidence

Output of sudo dmesg -T | grep -iE "killed process|out of memory":
[Sun Sep  6 20:23:56 2026] Memory cgroup out of memory: Killed process 3402 (weed) total-vm:2556184kB, anon-rss:509644kB, file-rss:2560kB, shmem-rss:0kB, UID:1000 pgtables:2436kB oom_score_adj:0
[Sun Sep  6 20:25:52 2026] Memory cgroup out of memory: Killed process 353289 (weed) total-vm:2557272kB, anon-rss:517120kB, file-rss:0kB, shmem-rss:0kB, UID:1000 pgtables:2448kB oom_score_adj:0
[Sun Sep  6 20:45:50 2026] Memory cgroup out of memory: Killed process 361123 (weed) total-vm:2557208kB, anon-rss:507816kB, file-rss:1280kB, shmem-rss:0kB, UID:1000 pgtables:2432kB oom_score_adj:0
[Sun Sep  6 20:48:35 2026] Memory cgroup out of memory: Killed process 440070 (weed) total-vm:2163048kB, anon-rss:480256kB, file-rss:25344kB, shmem-rss:0kB, UID:1000 pgtables:1740kB oom_score_adj:0
[Sun Sep  6 20:49:06 2026] Memory cgroup out of memory: Killed process 451217 (weed) total-vm:2557464kB, anon-rss:507904kB, file-rss:34560kB, shmem-rss:0kB, UID:1000 pgtables:2424kB oom_score_adj:0
[Sun Sep  6 20:49:34 2026] Memory cgroup out of memory: Killed process 453475 (weed) total-vm:2556696kB, anon-rss:509696kB, file-rss:36608kB, shmem-rss:0kB, UID:1000 pgtables:2424kB oom_score_adj:0
[Sun Sep  6 20:50:38 2026] Memory cgroup out of memory: Killed process 455604 (weed) total-vm:2425992kB, anon-rss:508672kB, file-rss:34048kB, shmem-rss:0kB, UID:1000 pgtables:2160kB oom_score_adj:0
[Sun Sep  6 20:57:35 2026] Memory cgroup out of memory: Killed process 460023 (weed) total-vm:2557208kB, anon-rss:501504kB, file-rss:35072kB, shmem-rss:0kB, UID:1000 pgtables:2436kB oom_score_adj:0
[Sun Sep  6 21:02:18 2026] Memory cgroup out of memory: Killed process 494732 (weed) total-vm:2491984kB, anon-rss:506880kB, file-rss:77568kB, shmem-rss:0kB, UID:1000 pgtables:2420kB oom_score_adj:0
[Sun Sep  6 21:09:16 2026] Memory cgroup out of memory: Killed process 510874 (weed) total-vm:2491088kB, anon-rss:470272kB, file-rss:77056kB, shmem-rss:0kB, UID:1000 pgtables:2368kB oom_score_adj:0
[Sun Sep  6 21:09:42 2026] Memory cgroup out of memory: Killed process 538973 (weed) total-vm:2557208kB, anon-rss:508928kB, file-rss:77312kB, shmem-rss:0kB, UID:1000 pgtables:2416kB oom_score_adj:0
[Sun Sep  6 21:10:39 2026] Memory cgroup out of memory: Killed process 541055 (weed) total-vm:2491344kB, anon-rss:502272kB, file-rss:77568kB, shmem-rss:0kB, UID:1000 pgtables:2376kB oom_score_adj:0
[Sun Sep  6 21:12:10 2026] Memory cgroup out of memory: Killed process 544969 (weed) total-vm:2491088kB, anon-rss:506624kB, file-rss:77312kB, shmem-rss:0kB, UID:1000 pgtables:2396kB oom_score_adj:0
[Sun Sep  6 21:12:39 2026] Memory cgroup out of memory: Killed process 551187 (weed) total-vm:2557208kB, anon-rss:510976kB, file-rss:78336kB, shmem-rss:0kB, UID:1000 pgtables:2436kB oom_score_adj:0
[Sun Sep  6 21:13:06 2026] Memory cgroup out of memory: Killed process 553423 (weed) total-vm:2557720kB, anon-rss:508416kB, file-rss:77824kB, shmem-rss:0kB, UID:1000 pgtables:2404kB oom_score_adj:0
[Sun Sep  6 21:13:25 2026] Memory cgroup out of memory: Killed process 555385 (weed) total-vm:2491600kB, anon-rss:510720kB, file-rss:78080kB, shmem-rss:0kB, UID:1000 pgtables:2412kB oom_score_adj:0
[Sun Sep  6 21:14:14 2026] Memory cgroup out of memory: Killed process 556890 (weed) total-vm:2557720kB, anon-rss:504064kB, file-rss:77824kB, shmem-rss:0kB, UID:1000 pgtables:2396kB oom_score_adj:0
[Sun Sep  6 21:16:26 2026] Memory cgroup out of memory: Killed process 560351 (weed) total-vm:2557464kB, anon-rss:508444kB, file-rss:78080kB, shmem-rss:0kB, UID:1000 pgtables:2420kB oom_score_adj:0
[Sun Sep  6 21:35:21 2026] Memory cgroup out of memory: Killed process 569460 (weed) total-vm:2426248kB, anon-rss:512768kB, file-rss:77056kB, shmem-rss:0kB, UID:1000 pgtables:2316kB oom_score_adj:0
[Sun Sep  6 21:35:55 2026] Memory cgroup out of memory: Killed process 645584 (weed) total-vm:2557208kB, anon-rss:511444kB, file-rss:77568kB, shmem-rss:0kB, UID:1000 pgtables:2424kB oom_score_adj:0
Output of docker compose logs seaweedfs --since 25m: seaweedfs-log.txt