Skip to content

Uvicorn causes linux session crash with out of memory error #759

Open
@GameKyuubi

Description

@GameKyuubi

SDUI/Uvicorn eventually crashes the user's session from OOM error, even while not actively generating images. journalctl reports:

Jan 09 14:15:16 kernel: Out of memory: Killed process 569725 (uvicorn) total-vm:44099472kB, anon-rss:19645212kB, file-rss:200140kB, shmem-rss:16384kB, UID:1000 pgtables:41196kB oom_score_adj:0
Jan 09 14:15:16 kernel: oom-kill:constraint=CONSTRAINT_NONE,nodemask=(null),cpuset=user.slice,mems_allowed=0,global_oom,task_memcg=/user.slice/user-1000.slice/session-1.scope,task=uvicorn,pid=569725,uid=1000
Jan 09 14:15:16 kernel: [ 569725]  1000 569725 11024868  4965434 42184704     1332             0 uvicorn

To Reproduce
Run SDUI for a while, or just leave it sitting.

Expected behavior
Don't crash the user session

Desktop (please complete the following information):

  • OS: Linux 6.1.3-arch1-1 SMP PREEMPT_DYNAMIC Wed, 04 Jan 2023 16:28:15 +0000 x86_64 GNU/Linux
  • Browser: firefox
  • Version: 108.0.2 (64-bit)

Additional context
seems OOM problems are common with uvicorn:
tiangolo/uvicorn-gunicorn-docker#98
encode/uvicorn#1583
encode/uvicorn#1226

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions