Make pool paused and cancelled errors easier to diagnose

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Unresolved
    • Priority: Unknown
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Python Drivers
    • None
    • None
    • None
    • None
    • None
    • None

      Connection pool paused errors (added in PYTHON-2462) look like this:

      AutoReconnect('localhost:27018: connection pool paused (configured timeouts: connectTimeoutMS: 20000.0ms)')
      

      Operation cancelled errors (added in PYTHON-3175) look like this:

      _OperationCancelled('operation cancelled')
      

      We should make these errors more informative and easier to diagnose but adding the reason. In the first case it would be the error that caused the pool to be paused:

      AutoReconnect('localhost:27018: connection pool paused because another operation failed with the following error: <network timeout/connection closed/shutdown in progress/etc...>')
      

      For the second it would be the SDAM timeout that caused the cancellation. Note an SDAM timeout is the only case here so we could either embed the error or just describe it:

      _OperationCancelled('operation cancelled because an SDAM heartbeat failed with a timeout which indicates the server is down')
      

            Assignee:
            Unassigned
            Reporter:
            Shane Harvey
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: