Uploaded image for project: 'Python Driver'
  1. Python Driver
  2. PYTHON-1141

ServerHeartbeatFailedEvent not always fired

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • 3.4
    • Affects Version/s: 3.3
    • Component/s: None
    • None

      When a heartbeat fails for the first time a ServerHeartbeatFailedEvent is not fired:

      INFO:root:Heartbeat to ('localhost', 27017) started
      INFO:root:Heartbeat to ('localhost', 27017) succeeded with reply {u'ismaster': True, u'maxWriteBatchSize': 1000, u'ok': 1.0, u'maxWireVersion': 5, u'readOnly': False, u'minWireVersion': 0, u'maxBsonObjectSize': 16777216, u'maxMessageSizeBytes': 48000000, u'localTime': datetime.datetime(2016, 8, 31, 16, 24, 24, 193000)}
      INFO:root:Heartbeat to ('localhost', 27017) started
      INFO:root:Heartbeat to ('localhost', 27017) started
      INFO:root:Heartbeat to ('localhost', 27017) failed with error localhost:27017: [Errno 111] Connection refused
      INFO:root:Heartbeat to ('localhost', 27017) started
      INFO:root:Heartbeat to ('localhost', 27017) failed with error localhost:27017: [Errno 111] Connection refused
      INFO:root:Heartbeat to ('localhost', 27017) started
      INFO:root:Heartbeat to ('localhost', 27017) failed with error localhost:27017: [Errno 111] Connection refused
      INFO:root:Heartbeat to ('localhost', 27017) started
      INFO:root:Heartbeat to ('localhost', 27017) succeeded with reply {u'ismaster': True, u'maxWriteBatchSize': 1000, u'ok': 1.0, u'maxWireVersion': 5, u'readOnly': False, u'minWireVersion': 0, u'maxBsonObjectSize': 16777216, u'maxMessageSizeBytes': 48000000, u'localTime': datetime.datetime(2016, 8, 31, 16, 25, 4, 242000)}
      INFO:root:Heartbeat to ('localhost', 27017) started
      INFO:root:Heartbeat to ('localhost', 27017) succeeded with reply {u'ismaster': True, u'maxWriteBatchSize': 1000, u'ok': 1.0, u'maxWireVersion': 5, u'readOnly': False, u'minWireVersion': 0, u'maxBsonObjectSize': 16777216, u'maxMessageSizeBytes': 48000000, u'localTime': datetime.datetime(2016, 8, 31, 16, 25, 14, 254000)}
      INFO:root:Heartbeat to ('localhost', 27017) started
      INFO:root:Heartbeat to ('localhost', 27017) started
      INFO:root:Heartbeat to ('localhost', 27017) failed with error localhost:27017: [Errno 111] Connection refused
      

      The SDAM monitoring spec requires that each started event always has a correlated succeeded or failed event.

            Assignee:
            bernie@mongodb.com Bernie Hackett
            Reporter:
            bernie@mongodb.com Bernie Hackett
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: