ExportXMLWordPrintableJSON

    • DB Integration & Observability
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Recently in SERVER-135020, we discovered that a long lived CancellationSource will hold a strong reference to the child cancellation states of every child CancellationSource until the parent source is canceled or destroyed. This can lead to steadily increasing memory usage until then (see HELP-102354).

      It looks like we also use this pattern in the health observer code where we have one global CancellationSource that is constructed with ServiceContext and destroyed during process shutdown. Both the ConfigServerHealthObserver and the LdapHealthObserver create a child CancellationSource on nearly every health check which is expected to happen in configurable intervals during server uptime. So we likely are acquiring some memory upon every health check that isn't reclaimed until process exit. 

      We should investigate the rate at which memory is accumulated here and consider patching the code similar to how we did in SERVER-135020. This is important to help prevent nodes from using too much memory under normal operations when health observing is enabled. Note that the health observers are only used on mongos and are disabled by default.

            Assignee:
            Arun Banala
            Reporter:
            Joseph Prince
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: