Uploaded image for project: 'C# Driver'
  1. C# Driver
  2. CSHARP-2423

Reduce the amount of work done while holding the lock in server session and connection pools

    • Type: Icon: Improvement Improvement
    • Resolution: Won't Do
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 2.7.0
    • Component/s: Performance
    • None
    • Hide

      1. What would you like to communicate to the user about this feature?
      2. Would you like the user to see examples of the syntax and/or executable code and its output?
      3. Which versions of the driver/connector does this apply to?

      Show
      1. What would you like to communicate to the user about this feature? 2. Would you like the user to see examples of the syntax and/or executable code and its output? 3. Which versions of the driver/connector does this apply to?

      Hello there.
       
      We have a weird situation in a production environment.
      MongoDB 4.0.2
      C# driver 2.7.0 (Legacy)
       
      Our software uses currently 64 threads to work with MongoDB and everything is good, but we've migrated to more powerfull software and want to use 128 threads.
      When we try to do set amount of threads to 128 the server hangs with 100% CPU consumption.
      Using dotTrace we've found that it is AcquireSession and ReleaseSession calls of ConnectionPool.
       
      in mongodb connection string we've tried to set maxPoolSize to 500 and it supposed to help, but it doesn't. Whatever we've tried to set in connection string - it is not working as expected and CPU usage is still 100%.
       
      It seems like it is sort of problem with connection pooling, but currently we didn't figured out how to fix it.
       
      Please, see file attached for dotTrace logs.
       
      Any recommendations much appreciated.
       
      Thanks,
      Valentin

        1. lock.png
          lock.png
          207 kB
        2. mongo.png
          mongo.png
          42 kB
        3. TestCSharp2423.zip
          4 kB

            Assignee:
            Unassigned Unassigned
            Reporter:
            valentin@plarium.com Valentin Abalmasov
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: