Performance degradation since 3.5.0

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Unresolved
    • Priority: Blocker - P1
    • 3.5.1
    • Affects Version/s: None
    • Component/s: None
    • None
    • None
    • Dotnet Drivers
    • None
    • None
    • None
    • None
    • None
    • None

      Summary

      After upgrading the C# MongoDB driver from 3.4.3 to 3.5.0, we observed a significant performance degradation across multiple application APIs, particularly in higher latency percentiles (P90 and above).
      Some requests hang for several seconds and are not cancelled properly:

      This issue affects multiple, independently developed applications, suggesting it is not caused by some application specific query/logic.

      Our setup:

      MongoDB 7.0.16 (replica set, no sharding)

      Applications deployed on Kubernetes, running on mcr.microsoft.com/dotnet/sdk:9.0

      After bisecting all commits between versions 3.4.3 and 3.5.0, we have found that this particular commit has introduced the performance issue: https://github.com/mongodb/mongo-csharp-driver/commit/b2f1180919cad6d033f8980cfe8a7e2e3cc69caa

      Also after reverting just this specific commit on 3.5.0, everything works fine.

      How to Reproduce

      Unfortunately, we have not yet found an isolated way to reproduce the problem.

      Additional Background

      I have attached logs with MongoDB.Connection, MongoDB.ServerSelection, MongoDB.SDAM

      Thank you

        1. logs2.zip
          111 kB
        2. image-2025-10-08-18-48-31-112.png
          image-2025-10-08-18-48-31-112.png
          131 kB

            Assignee:
            Oleksandr Poliakov
            Reporter:
            Daniel Wust
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: