Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement cleanup mechanism for stale database entries in FlottformDatabase #103

Open
2 tasks
nidhal-labidi opened this issue Dec 11, 2024 · 0 comments · May be fixed by #104
Open
2 tasks

Implement cleanup mechanism for stale database entries in FlottformDatabase #103

nidhal-labidi opened this issue Dec 11, 2024 · 0 comments · May be fixed by #104

Comments

@nidhal-labidi
Copy link
Contributor

Description

The FlottformDatabase currently retains all connection data indefinitely until the server is restarted or the deleteEndpoint method is called. This can lead to memory bloat, especially in scenarios where connections are not explicitly closed or cleanup isn't performed. For example, the user establishes a new connection and for some reason he refreshes the page before sending anything -> the close method won't be called inside the class FlottformChannelHost and thuse the entry won't be deleted.

To address this issue, we need a mechanism to periodically remove inactive entries while ensuring no active connections are affected. The solution should leverage the lastUpdate field to determine inactivity.

Links / References

Further links on the topic

Tasks / Definition of Done

  • Implement the changes mentioned above
  • Test it

Further information

Inactive entries should be defined based on a configurable timeout period. For now that period is set to 30 minutes.

@nidhal-labidi nidhal-labidi linked a pull request Dec 11, 2024 that will close this issue
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant