Skip to content

server sessions are never evicted: RSS compounds per /load_expr (11.2GB after three sessions) #925

Description

@paddymul

Problem

Each /load_expr session permanently retains its memory: in one run the server went 179MB → 351MB (23.9M-row table) → 6,044MB (18.45M-row table with a near-unique id column, see companion issue) → 11,198MB (diff compare session over the same data). Nothing is evicted or released between loads — opening N large entries costs the sum of all of them for the life of the process. This is the same growth pattern behind the 16.9GB incident logged in tallyman#34, still present on 0.14.19. For tallyman's usage (one long-lived buckaroo serving every catalog entry the user clicks through) unbounded session accumulation is the steady state, not an edge case.

Suggested fix

An eviction policy on the session table: LRU by last websocket activity with a process-RSS or per-session-size budget, dropping the materialized frames/caches while keeping the session id re-creatable (tallyman already re-issues /load_expr on a session miss). Even a blunt max-sessions=K would bound the damage.

Context

Measured during tallyman prompt-pack run pack01 (2026-06-11), buckaroo 0.14.19 driven by tallyman main @ 99237ee. Cross-referenced from tallyman#34.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions