The MongoClientSettings.MaxConnectionLifeTime does not accept zero/infinite values

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Unresolved
    • Priority: Minor - P4
    • None
    • Affects Version/s: 3.9.0
    • Component/s: Configuration
    • None
    • None
    • Dotnet Drivers
    • None
    • None
    • None
    • None
    • None
    • None

      Hi!

      The MongoClientSettings.MaxConnectionIdleTime was recently made to accept "infinite" value to close CSHARP-2868. The MaxConnectionLifeTime could get a similar treatment to prevent unnecessary reconnections. Of course one can set it, like, 10 years in the future, but I do not see why it should be this way. We're setting MinPoolSize to keep up connections in anticipation of load spike and would like them to be kept indefinitely (yes, there are potential issues with the need of TCP keepalives on some networks). The current restriction that allows to set arbitrarily large intervals, but not zero and/or Timeout.InfiniteTimeSpan looks strange.

       

            Assignee:
            Oleksandr Poliakov
            Reporter:
            Aristarkh Zagorodnikov (EXT)
            None
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: