Skip to content

High amount of memory usage from ImmutableList<Int64> #358

Open
@novak-dev

Description

@novak-dev

immutablelist-leak
Describe the bug
After running load tests, I have observed a potential memory leak when running the meta-api descriptor service.

To Reproduce

  1. Run Wamp server realm and run realm.HostMetaApiService()
  2. Create a topic for reflection based publisher/subscriber
  3. Create a large number of clients (1000+) and subscribe to the topic
  4. Disconnect these clients
  5. Repeat the previous two steps a few times, make sure to use new session id for the clients

Expected behavior
When clients disconnect the memory used by the ImmutableList mSubscribers should drop

.NET platform variant

  • .NET 6.0 on Windows 10
  • Wampsharp build 23.5.1 (also reproducible on older versions)

Additional context
See the attached file for info. The count only goes up in ImmutableList> and that memory never gets released, even when I force GC multiple times. Issue goes away when I disable meta api service or I do not perform any subscriptions.

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