Skip to content

Tortoise.Registry does not clean up when a connection is closed. #147

Description

@Baronozone

The Tortoise.Registry looks like it is not monitoring new Connection processes, so if they fail (or are simply closed) the information is still retained in the registry. This happens regardless of using start_link to create the connection or if you use the Tortoise.Supervisor to create the connection and close it with DynamicSupervisor.terminate_child(Tortoise.Supervisor, connection_pid). If the client_id remains the same, a new connection will not create a new entry, but in our use case we make many transient connections over time, and each has a unique client_id. So the failure to remove unused entries causes a long-term memory leak essentially.

Is there a way to remove unused entries in the Tortoise.Registry? It might be preferable to have the registry monitor the connections and remove any entries automagically, as other registries do.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions