Skip to content

feat(monitoring): an alert fires when the cache valkey nears its memory bound #2094

Description

@dan-petty

What happened

#711 bounds the shared LLM Valkey with --maxmemory 1536mb --maxmemory-policy noeviction. With noeviction, a full Valkey refuses each write, and Open WebUI then fails to keep its session and task state. No alert fires before that: ValkeyCacheErrors does not cover a refused write.

What should happen

An alert fires when the cache Valkey's memory use nears its bound, for example above 80% of maxmemory for 10 minutes.

Evidence

Scope

One alert rule beside the existing Valkey alerts under k8s/monitoring/, and its test.

Proposed design

Problem statement

The shared LLM Valkey uses noeviction and a 1536 MiB memory bound set by #711. When the bound is reached, Valkey refuses all writes and Open WebUI loses session and task state. The existing ValkeyCacheErrors alert does not cover a refused write. An alert must fire before the bound is reached so a person can act in time.

Acceptance criteria

  • Criterion 1: A new alert rule fires when redis_memory_used_bytes exceeds 80% of redis_memory_max_bytes for 10 minutes on the cache Valkey's redis-exporter sidecar.
    Verification: Inspect k8s/monitoring/prometheus-values.yaml for the new rule. Confirm the expression divides redis_memory_used_bytes by redis_memory_max_bytes, compares to 0.8, and sets for: 10m.
  • Criterion 2: The alert carries a warning severity label and a human-readable description.
    Verification: Inspect the alert rule in k8s/monitoring/prometheus-values.yaml for a severity: warning label and a non-empty description field.
  • Criterion 3: The alert is documented in k8s/README.md beside the existing ValkeyCacheErrors entry.
    Verification: Open k8s/README.md and confirm the new alert appears in the alerts table with its name, condition, duration and severity.
  • Criterion 4: A test verifies the alert rule is present and correctly configured.
    Verification: Run the monitoring test suite. Confirm the new test passes and that it checks for the alert name, expression, duration and severity.

Key questions

  • Which metrics does the redis-exporter sidecar export for memory?: The sidecar exports redis_memory_used_bytes and redis_memory_max_bytes. Before feat(ai): pinned image tags and bounded shared valkey in the llm stack #711, redis_memory_max_bytes was 0. [sources: openspec/changes/archive/2026-10-24-711-bounded-shared-valkey/tasks.md]
  • Where are the existing Valkey alerts defined?: The ValkeyCacheErrors alert is defined in k8s/monitoring/prometheus-values.yaml at line 612. [sources: k8s/monitoring/prometheus-values.yaml:612]
  • What threshold and duration should the alert use?: Above 80% of maxmemory sustained for 10 minutes, as stated in the issue body. (proposed)
  • What severity should the new alert carry?: warning, matching the existing ValkeyCacheErrors alert in the alerts table. (proposed) [sources: k8s/README.md:403]
  • Does the alert target only the cache Valkey or also the run index Valkey?: Only the cache Valkey. The issue title and body name the cache Valkey, and the scope says one alert rule beside the existing Valkey alerts. (proposed) [sources: k8s/llm/valkey.yaml:74]

Fit

Fits in one pull request.

Suspected block

None.

Dependencies

None.

Activity

  1. added
    source/agent
    type/feature
    on Oct 24, 2026
  2. dan-petty commented on Oct 24, 2026

    @dan-petty
    OwnerAuthor

    Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones on the board.

    • Type: type/feature. The candidate proposes a new alert feature for monitoring cache valkey memory use.
    • Priority: P2-Medium. The alert helps prevent service disruption when cache valkey reaches memory limits.
    • Value: High. The alert prevents session and task state failures in Open WebUI when cache valkey is full.
    • Effort: Medium. Requires adding one new alert rule and its test in the monitoring configuration.
    • Related: feat(ai): pinned image tags and bounded shared valkey in the llm stack #711, which asks for a different change. Both items work on the shared LLM Valkey. The candidate adds an alert for memory use, while item #711 bounds the valkey with maxmemory and noeviction policy.
  3. dan-petty commented on Oct 28, 2026

    @dan-petty
    OwnerAuthor

    Status set to Ready at bb46660 (see proposed design in issue body).

  4. added
    priority/p2-medium
    status/ready
    effort/medium
    value/high
    on Oct 28, 2026
  5. added a commit that references this issue on Oct 29, 2026
  6. removed
    status/ready
    on Oct 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    effort/mediumpriority/p2-mediumsource/agenttype/featurevalue/high

    Type

    No type

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions