Skip to content

Implement cleanup mechanism for stale database entries in FlottformDatabase #103

@nidhal-labidi

Description

@nidhal-labidi

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions