Skip to content

nats streams max age should be configured #2681

Closed

Description

@butonic

Disk usage of nats streams on disk (or in memory) might grow large. We can forget old kv entries and messages in nats by configuring the streams manually.

  1. persistent stores
nats stream edit main-queue --max-age=7d
nats stream edit KV_postprocessing --max-age=7d
nats stream edit KV_userlog --max-age=14d
nats stream edit KV_eventhistory --max-age=14d
  1. cache stores
nats stream edit KV_cache-userinfo --max-age=10s
nats stream edit KV_service-registry --max-age=30s
nats stream edit KV_storage-users --max-age=24h
nats stream edit KV_storage-system --max-age=24h
nats stream edit KV_cache-roles --max-age=24h
nats stream edit KV_proxy --max-age=24h
nats stream edit KV_opencloud-pkg --max-age=24h
nats stream edit KV_settings-cache --max-age=10m

Acceptance Criteria:

  • TTL Settings are applied at start up
  • doublecheck default values

Maybe someone can do this with compose once the opencloud container is running. It contains nats. Or we configure the streams properly when using the nats-go package directly, after #2512

Activity

  1. butonic commented on Apr 8, 2026

    @butonic
    MemberAuthor

    cc @dragonchaser in case you want to know how we configure the max age for k8s deployments.

  2. butonic commented on Apr 17, 2026

    @butonic
    MemberAuthor

    cc @kulmann you should be able to reclaim a lot of space.

    @Svanvith @LisaHue something for the docs?

  3. aduffeck commented on Apr 20, 2026

    @aduffeck
    Member

    KV_ids-storage-users shouldn't be limited when the posix driver is being used as it would make the according files inaccessible until the next warmup.

    I would also suggest to keep KV_activitylog unlimited to not lose activities.

  4. moved this from Qualification to No status in OpenCloud Team Boardon Apr 27, 2026
  5. rhafer commented on Apr 27, 2026

    @rhafer
    Member

    @db-ot I think we should address this before the next stable release. Needs refinement.

  6. self-assigned this
    on Apr 29, 2026
  7. moved this from Backlog to In Progress in OpenCloud Team Boardon Apr 29, 2026
  8. aduffeck commented on May 4, 2026

    @aduffeck
    Member

    The two PRs implement the following TTL settings:

    TTL Settings Configuration

    Updated Defaults

    • storage-users: 24m → 24h
    • storage-system: 24m → 24h
    • proxy: 12h → 24h
    • cache-roles: 14d → 24h
    • opencloud-pkg: 1h → 24h

    New & Fixed TTLs

    • main-queue: Added a TTL of 7 days
    • KV_postprocessing: Added a TTL of 7 days

    Unchanged / Existing TTLs

    • userlog: 14 days
    • settings-cache: 10 minutes
    • service-registry: 30 seconds
    • cache-userinfo: 10 seconds

    No TTL (Kept Indefinitely)

    • activitylog
    • eventhistory
    • storage-users-id-cache
  9. added a commit that references this issue on May 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions