modelcontextprotocol / modelcontextprotocol/example-remote-server

Session ownership data is never removed from Redis

Open
#21 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
TypeScript
Stars
80
Forks
39
Avg merge
43m
Merged PRs (30d)
1

Description

Describe the bug
Session ownership data is being stored in redis and don't have TTL or are removed

To Reproduce
Steps to reproduce the behavior:

  1. Create Session
  2. Finish Session
  3. Repeat a big number of times

Expected behavior
Session ownership should be cleaned from Redis when session is finished or after a prudential amount of time

Logs

Additional context
Service is storing session ownership info in redis using session:${sessionId}:owner but this data is not removed when cleaning up the transport data. This can cause a memory leak over time if no clean up mechanism is implemented.

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.

Research direction

Inspect the transport-data cleanup path and the Redis key session:${sessionId}:owner. Reproduce the repeated create-and-finish session sequence, then verify that ownership data is removed when a session finishes or expires after a defined period, without continuing to accumulate in Redis.

Written by the indexing model from the issue text.

Assessment

Tech stack
redis, typescript
Domain
backend, databases
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.