nextcloud / nextcloud/whiteboard
Token TTL configuration
@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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.