nextcloud / nextcloud/whiteboard

Token TTL configuration

Open
#798 0 comments 0 reactions 1 assignee View on GitHub

@hweihwang is already working on this.

Since Nov 25, 2025.

Dominant language
JavaScript
Stars
215
Forks
39
Avg merge
1d 3h
Merged PRs (30d)
32

Description

Issue

I am running into frequent OOMKill issues when running redis as a storage backend. A little investigation shows, that no TTL is set on any keys written into redis.

Details:

  • redis:8.2.3
  • whiteboard:v1.3.0

Analysis

Digging into the code I found a setting CACHED_TOKEN_TTL that was introduced in #306 . The setting still exists in the websocket_server/Config.js however, it is not used anywhere in the code anymore. It seems like this refactoring (#393) reverted the usage of this setting. I was not able to find any explanation or mention on why this was removed.

Proposed Solution

Reintroduce the handling of the CACHED_TOKEN_TTL in the ServerManager class as in #306:

		this.cachedTokenStorage = Config.STORAGE_STRATEGY === 'redis'
			? StorageManager.create('general-redis', this.redisClient, null, { prefix: 'token_', ttl: Config.CACHED_TOKEN_TTL / 1000 })
			: StorageManager.create('general-lru', null, null, { ttl: Config.CACHED_TOKEN_TTL })

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.