Uploaded image for project: 'PHP Driver: Extension'
  1. PHP Driver: Extension
  2. PHPC-273

Connecting to inaccessible host spams debug log

    • Type: Icon: Improvement Improvement
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 0.5.1
    • Component/s: None
    • None

      Not sure if this is related to PHPC-252, but I noticed that the debug log gets absolutely spammed when attempting to connect to an offline host. This is especially problematic if output is being directed to a file, as it can fill up very quickly. A snippet:

      [2015-04-25T01:22:26+00:00]     PHONGO: TRACE   > ENTRY: phongo_stream_initiator():1037
      [2015-04-25T01:22:26+00:00]     PHONGO: DEBUG   > Connecting to '127.0.0.1:1234[mongodb://127.0.0.1:1234]'
      [2015-04-25T01:22:26+00:00]     PHONGO: DEBUG   > Created: RSRC#71 as '127.0.0.1:1234[mongodb://127.0.0.1:1234]'
      [2015-04-25T01:22:26+00:00]     PHONGO: TRACE   >  EXIT: phongo_stream_initiator():1161
      [2015-04-25T01:22:26+00:00]     stream: TRACE   > ENTRY: mongoc_stream_writev():143
      [2015-04-25T01:22:26+00:00]     stream: TRACE   >  writev = 0x2759340 [58]
      [2015-04-25T01:22:26+00:00]     stream: TRACE   > 00000:  3a 00 00 00 01 00 00 00  00 00 00 00 d4 07 00 00  : . . . . . . .  . . . . . . . .
      [2015-04-25T01:22:26+00:00]     stream: TRACE   > 00010:  04 00 00 00 61 64 6d 69  6e 2e 24 63 6d 64 00 00  . . . . a d m i  n . $ c m d . .
      [2015-04-25T01:22:26+00:00]     stream: TRACE   > 00020:  00 00 00 ff ff ff ff 13  00 00 00 10 69 73 4d 61  . . . . . . . .  . . . . i s M a
      [2015-04-25T01:22:26+00:00]     stream: TRACE   > 00030:  73 74 65 72 00 01 00 00  00 00                    s t e r . . . .  . .
      [2015-04-25T01:22:26+00:00]     PHONGO: DEBUG   > Setting timeout to: 0
      [2015-04-25T01:22:26+00:00]     stream: TRACE   >  EXIT: mongoc_stream_writev():158
      [2015-04-25T01:22:26+00:00]     buffer: TRACE   > ENTRY: _mongoc_buffer_try_append_from_stream():294
      [2015-04-25T01:22:26+00:00]     stream: TRACE   > ENTRY: mongoc_stream_read():260
      [2015-04-25T01:22:26+00:00]     stream: TRACE   > ENTRY: mongoc_stream_readv():220
      [2015-04-25T01:22:26+00:00]     PHONGO: DEBUG   > Setting timeout to: 0
      [2015-04-25T01:22:26+00:00]     PHONGO: DEBUG   > Reading got: 0 wanted: 0
      [2015-04-25T01:22:26+00:00]     stream: TRACE   >  readv = 0x7ffc15bd83c0 [4]
      [2015-04-25T01:22:26+00:00]     stream: TRACE   > 00000:  00 00 00 00                                       . . . .
      [2015-04-25T01:22:26+00:00]     stream: TRACE   >  EXIT: mongoc_stream_readv():231
      [2015-04-25T01:22:26+00:00]     stream: TRACE   >  EXIT: mongoc_stream_read():272
      [2015-04-25T01:22:26+00:00]     buffer: TRACE   >  EXIT: _mongoc_buffer_try_append_from_stream():324
      [2015-04-25T01:22:26+00:00]     buffer: TRACE   > ENTRY: _mongoc_buffer_try_append_from_stream():294
      [2015-04-25T01:22:26+00:00]     stream: TRACE   > ENTRY: mongoc_stream_read():260
      [2015-04-25T01:22:26+00:00]     stream: TRACE   > ENTRY: mongoc_stream_readv():220
      [2015-04-25T01:22:26+00:00]     PHONGO: DEBUG   > Setting timeout to: 0
      [2015-04-25T01:22:26+00:00]     PHONGO: DEBUG   > Reading got: 0 wanted: 0
      [2015-04-25T01:22:26+00:00]     stream: TRACE   >  readv = 0x7ffc15bd83c0 [4]
      [2015-04-25T01:22:26+00:00]     stream: TRACE   > 00000:  00 00 00 00                                       . . . .
      [2015-04-25T01:22:26+00:00]     stream: TRACE   >  EXIT: mongoc_stream_readv():231
      [2015-04-25T01:22:26+00:00]     stream: TRACE   >  EXIT: mongoc_stream_read():272
      [2015-04-25T01:22:26+00:00]     buffer: TRACE   >  EXIT: _mongoc_buffer_try_append_from_stream():324
      
      ...repeats ad infinitum...
      

            Assignee:
            bjori Hannes Magnusson
            Reporter:
            jmikola@mongodb.com Jeremy Mikola
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: