• 1.4.31-sgian-dubh 87016efc97

    loweel released this 2026-11-23 08:17:57 +01:00 | 27 commits to master since this release

    Stabbypossum 1.4.31 "SGIAN-DUBH" fixes the memory that serving media kept.

    Install

    Run the image from Docker Hub: loweel/stabbypossum.

    This release ships no binaries. The source archive is attached below.

    What changed

    Serving a user's media no longer keeps memory. A GET of an image or a video under /<user>/s/, and of a cached remote emoji, read the whole file into memory and copied it several times before it reached the socket. Every HTTP task kept the space of the largest file it had served, for as long as the process lived. In production this showed as steps in the Memory chart that never came down: on 23 November two clients fetched about fifty media in parallel, and the live heap went from 64.8 to 84.0 MiB and stayed there.

    The file is now handed to libmicrohttpd, which sends it from disk; its bytes never pass through the server's memory. Linux's page cache already keeps the files that are read often.

    Measured locally at 1 CPU, 16 parallel GETs of 4 MiB videos, four rounds:

    before after
    live heap after the first round +192 MiB +0.7 MiB
    time per round 2.0 s 0.3 s

    Tests: the smoke's --media-burst N runs N such rounds and reports the live heap after each.

    Downloads