Uploaded image for project: 'Compass '
  1. Compass
  2. COMPASS-6273

"MongoServerSelectionError: connect ECONNREFUSED 127.0.0.1:27017" when running View on large collection

    • Type: Icon: Bug Bug
    • Resolution: Won't Fix
    • Priority: Icon: Major - P3 Major - P3
    • No version
    • Affects Version/s: 1.33.1
    • Component/s: Query
    • None
    • Environment:
      Mac 12.6
      Compass 1.33.1
    • 8
    • Not Needed

      Problem Statement/Rationale

      What is going wrong? What action would you like the Engineering team to take?

      Saw "[MongoServerSelectionError:|#]connect ECONNREFUSED 127.0.0.1:27017" when running a View on a very large collection. Laptop is almost out of disk space also.

      Please be sure to attach relevant logs with any sensitive data redacted.

      Steps to Reproduce

      How could an engineer replicate the issue you’re reporting?

      "db.LimitView.aggregate([{$match:

      {docNumber:1}

      } ],{allowDiskUse:true})"

      test.things collection has 131.3k documents / 1.27 GB of data

      Expected Results

      What do you expect to happen?

      mongo shell can run this query with {allowDiskUse:true}. It found the 2 instances.

      embedded mongosh generates the error described.

      After this error in Compass, it's hard to navigate to the other (smaller) collections and databases. It's not behaving as expected. It's much slower and documents are not shown (blank content pane where documents would be). Would prefer graceful recovery from this event.

      Actual Results

      What do you observe is happening?

      When the Compass log file can't be written to, a stacktrace is generated while logged into mongo shell.

      MongoDB Enterprise > {"t":{"$date":"2022-11-02T18:45:16.918-07:00"},"s":"F",  "c":"CONTROL",  "id":4522200, "ctx":"conn66","msg":"Writing to log file failed, aborting application","attr":{"files":["/Users/felicia.hsieh/Test/./logs/mongod.log"]}}
      BACKTRACE: {"backtrace":[{"a":"105032C33","b":"102406000","o":"2C2CC33","s":"_ZN5mongo18stack_trace_detail12_GLOBAL__N_119printStackTraceImplERKNS1_7OptionsEPNS_14StackTraceSinkE","s+":"123"},\{"a":"105033E7D","b":"102406000","o":"2C2DE7D","s":"_ZN5mongo15printStackTraceERNSt3__113basic_ostreamIcNS0_11char_traitsIcEEEE","s+":"3D"},\{"a":"104FFCF07","b":"102406000","o":"2BF6F07","s":"_ZN5mongo5logv214FileRotateSink7consumeERKN5boost3log12v2s_mt_posix11record_viewERKNSt3__112basic_stringIcNS8_11char_traitsIcEENS8_9allocatorIcEEEE","s+":"4F7"},\{"a":"105016998","b":"102406000","o":"2C10998","s":"_ZN5mongo5logv216CompositeBackendIJNS0_14FileRotateSinkENS0_10RamLogSinkES3_NS0_14UserAssertSinkEEE10consumeAllIJLm0ELm1ELm2ELm3EEEEvRKN5boost3log12v2s_mt_posix11record_viewERKNSt3__112basic_stringIcNSD_11char_traitsIcEENSD_9allocatorIcEEEENSD_16integer_sequenceImJXspT_EEEE","s+":"48"},\{"a":"10501679E","b":"102406000","o":"2C1079E","s":"_ZN5boost3log12v2s_mt_posix5sinks30basic_formatting_sink_frontendIcE11feed_recordINS1_3aux10fake_mutexEN5mongo5logv216CompositeBackendIJNS9_14FileRotateSinkENS9_10RamLogSinkESC_NS9_14UserAssertSinkEEEEEEvRKNS1_11record_viewERT_RT0_","s+":"DE"},\{"a":"105016646","b":"102406000","o":"2C10646","s":"_ZN5boost3log12v2s_mt_posix5sinks13unlocked_sinkIN5mongo5logv216CompositeBackendIJNS5_14FileRotateSinkENS5_10RamLogSinkES8_NS5_14UserAssertSinkEEEEE7consumeERKNS1_11record_viewE","s+":"26"},\{"a":"105012B2A","b":"102406000","o":"2C0CB2A","s":"_ZN5boost3log12v2s_mt_posix5sinks4sink11try_consumeERKNS1_11record_viewE","s+":"A"},\{"a":"105124EA5","b":"102406000","o":"2D1EEA5","s":"_ZN5boost3log12v2s_mt_posix4core16push_record_moveERNS1_6recordE","s+":"1B5"},\{"a":"105009D55","b":"102406000","o":"2C03D55","s":"_ZN5mongo5logv29LogSource11push_recordEON5boost3log12v2s_mt_posix6recordE","s+":"15"},\{"a":"1050098F5","b":"102406000","o":"2C038F5","s":"_ZN5mongo5logv26detail9doLogImplEiRKNS0_11LogSeverityERKNS0_10LogOptionsENS_10StringDataERKNS0_26TypeErasedAttributeStorageE","s+":"255"},\{"a":"103DDB93D","b":"102406000","o":"19D593D","s":"_ZN5mongo5CurOp23completeAndLogOperationEPNS_16OperationContextENS_5logv212LogComponentEN5boost8optionalImEENS6_IxEEb","s+":"78D"},\{"a":"10246BBB3","b":"102406000","o":"65BB3","s":"_ZN5mongo14future_details10statusCallIRZNS_23ServiceEntryPointCommon13handleRequestEPNS_16OperationContextERKNS_7MessageENSt3__110unique_ptrIKNS2_5HooksENS8_14default_deleteISB_EEEEE4$_39JNS_10DbResponseEEEEDaOT_DpOT0_","s+":"123"},\{"a":"102446E7A","b":"102406000","o":"40E7A","s":"_ZN5mongo23ServiceEntryPointCommon13handleRequestEPNS_16OperationContextERKNS_7MessageENSt3__110unique_ptrIKNS0_5HooksENS6_14default_deleteIS9_EEEE","s+":"5DA"},\{"a":"102443D02","b":"102406000","o":"3DD02","s":"_ZN5mongo23ServiceEntryPointMongod13handleRequestEPNS_16OperationContextERKNS_7MessageE","s+":"52"},\{"a":"102491057","b":"102406000","o":"8B057","s":"_ZN5mongo9transport19ServiceStateMachine4Impl14processMessageEv","s+":"207"},\{"a":"10249679D","b":"102406000","o":"9079D","s":"_ZZNO5mongo14future_details10FutureImplINS0_8FakeVoidEE4thenIZNS_9transport19ServiceStateMachine4Impl12startNewLoopERKNS_6StatusEE4$_10EEDaOT_ENKUlOS2_E_clESF_","s+":"2D"},\{"a":"1024920E0","b":"102406000","o":"8C0E0","s":"_ZN5mongo9transport19ServiceStateMachine4Impl12startNewLoopERKNS_6StatusE","s+":"110"},\{"a":"1024973DF","b":"102406000","o":"913DF","s":"_ZZN5mongo15unique_functionIFvNS_6StatusEEE8makeImplIZNS_9transport19ServiceStateMachine4Impl15scheduleNewLoopES1_E3$_7EEDaOT_EN12SpecificImpl4callEOS1_","s+":"5F"},\{"a":"104974590","b":"102406000","o":"256E590","s":"_ZZN5mongo15unique_functionIFvNS_6StatusEEE8makeImplIZNS_9transport26ServiceExecutorSynchronous18runOnDataAvailableERKNSt3__110shared_ptrINS5_7SessionEEES3_E3$_5EEDaOT_EN12SpecificImpl4callEOS1_","s+":"40"},\{"a":"104970ED9","b":"102406000","o":"256AED9","s":"_ZZN5mongo9transport15ServiceExecutor8scheduleENS_15unique_functionIFvNS_6StatusEEEEENUlvE_clEv","s+":"39"},\{"a":"10497423C","b":"102406000","o":"256E23C","s":"_ZZN5mongo15unique_functionIFvvEE8makeImplIZNS_9transport26ServiceExecutorSynchronous12scheduleTaskES2_NS4_15ServiceExecutor13ScheduleFlagsEE3$_4EEDaOT_EN12SpecificImpl4callEv","s+":"18C"},\{"a":"104975088","b":"102406000","o":"256F088","s":"_ZN5mongo12_GLOBAL__N_17runFuncEPv","s+":"18"},\{"a":"7FF81477D4E1","b":"7FF814777000","o":"64E1","s":"_pthread_start","s+":"7D"},\{"a":"7FF814778F6B","b":"7FF814777000","o":"1F6B","s":"thread_start","s+":"F"}],"processInfo":{"mongodbVersion":"5.0.5","gitVersion":"d65fd89df3fc039b5c55933c0f71d647a54510ae","compiledModules":["enterprise"],"uname":{"sysname":"Darwin","release":"21.6.0","version":"Darwin Kernel Version 21.6.0: Mon Aug 22 20:17:10 PDT 2022; root:xnu-8020.140.49~2/RELEASE_X86_64","machine":"x86_64"},"somap":[\{"path":"/Users/felicia.hsieh/mongodb-macos-x86_64-enterprise-5.0.5/bin/mongod","machType":2,"b":"102406000","vmaddr":"100000000","buildId":"A907A1E08B4232949CE0378D0BC9FE0B"},\{"path":"/usr/lib/system/libsystem_pthread.dylib","machType":6,"b":"7FF814777000","vmaddr":"7FF80031B000","buildId":"B5454E27E8C73FDBB77F714F1E82E70B"}]}}
        Frame: {"a":"105032C33","b":"102406000","o":"2C2CC33","s":"ZN5mongo18stack_trace_detail12_GLOBAL_N_119printStackTraceImplERKNS1_7OptionsEPNS_14StackTraceSinkE","s+":"123"}
        Frame: {"a":"105033E7D","b":"102406000","o":"2C2DE7D","s":"ZN5mongo15printStackTraceERNSt3_113basic_ostreamIcNS0_11char_traitsIcEEEE","s+":"3D"}
        Frame: {"a":"104FFCF07","b":"102406000","o":"2BF6F07","s":"ZN5mongo5logv214FileRotateSink7consumeERKN5boost3log12v2s_mt_posix11record_viewERKNSt3_112basic_stringIcNS8_11char_traitsIcEENS8_9allocatorIcEEEE","s+":"4F7"}
        Frame: {"a":"105016998","b":"102406000","o":"2C10998","s":"ZN5mongo5logv216CompositeBackendIJNS0_14FileRotateSinkENS0_10RamLogSinkES3_NS0_14UserAssertSinkEEE10consumeAllIJLm0ELm1ELm2ELm3EEEEvRKN5boost3log12v2s_mt_posix11record_viewERKNSt3_112basic_stringIcNSD_11char_traitsIcEENSD_9allocatorIcEEEENSD_16integer_sequenceImJXspT_EEEE","s+":"48"}
        Frame: {"a":"10501679E","b":"102406000","o":"2C1079E","s":"ZN5boost3log12v2s_mt_posix5sinks30basic_formatting_sink_frontendIcE11feed_recordINS1_3aux10fake_mutexEN5mongo5logv216CompositeBackendIJNS9_14FileRotateSinkENS9_10RamLogSinkESC_NS9_14UserAssertSinkEEEEEEvRKNS1_11record_viewERT_RT0","s+":"DE"}
        Frame: {"a":"105016646","b":"102406000","o":"2C10646","s":"_ZN5boost3log12v2s_mt_posix5sinks13unlocked_sinkIN5mongo5logv216CompositeBackendIJNS5_14FileRotateSinkENS5_10RamLogSinkES8_NS5_14UserAssertSinkEEEEE7consumeERKNS1_11record_viewE","s+":"26"}
        Frame: {"a":"105012B2A","b":"102406000","o":"2C0CB2A","s":"_ZN5boost3log12v2s_mt_posix5sinks4sink11try_consumeERKNS1_11record_viewE","s+":"A"}
        Frame: {"a":"105124EA5","b":"102406000","o":"2D1EEA5","s":"_ZN5boost3log12v2s_mt_posix4core16push_record_moveERNS1_6recordE","s+":"1B5"}
        Frame: {"a":"105009D55","b":"102406000","o":"2C03D55","s":"_ZN5mongo5logv29LogSource11push_recordEON5boost3log12v2s_mt_posix6recordE","s+":"15"}
        Frame: {"a":"1050098F5","b":"102406000","o":"2C038F5","s":"_ZN5mongo5logv26detail9doLogImplEiRKNS0_11LogSeverityERKNS0_10LogOptionsENS_10StringDataERKNS0_26TypeErasedAttributeStorageE","s+":"255"}
        Frame: {"a":"103DDB93D","b":"102406000","o":"19D593D","s":"_ZN5mongo5CurOp23completeAndLogOperationEPNS_16OperationContextENS_5logv212LogComponentEN5boost8optionalImEENS6_IxEEb","s+":"78D"}
        Frame: {"a":"10246BBB3","b":"102406000","o":"65BB3","s":"ZN5mongo14future_details10statusCallIRZNS_23ServiceEntryPointCommon13handleRequestEPNS_16OperationContextERKNS_7MessageENSt3110unique_ptrIKNS2_5HooksENS8_14default_deleteISB_EEEEE4$_39JNS_10DbResponseEEEEDaOT_DpOT0","s+":"123"}
        Frame: {"a":"102446E7A","b":"102406000","o":"40E7A","s":"ZN5mongo23ServiceEntryPointCommon13handleRequestEPNS_16OperationContextERKNS_7MessageENSt3_110unique_ptrIKNS0_5HooksENS6_14default_deleteIS9_EEEE","s+":"5DA"}
        Frame: {"a":"102443D02","b":"102406000","o":"3DD02","s":"_ZN5mongo23ServiceEntryPointMongod13handleRequestEPNS_16OperationContextERKNS_7MessageE","s+":"52"}
        Frame: {"a":"102491057","b":"102406000","o":"8B057","s":"_ZN5mongo9transport19ServiceStateMachine4Impl14processMessageEv","s+":"207"}
        Frame: {"a":"10249679D","b":"102406000","o":"9079D","s":"ZZNO5mongo14future_details10FutureImplINS0_8FakeVoidEE4thenIZNS_9transport19ServiceStateMachine4Impl12startNewLoopERKNS_6StatusEE4$_10EEDaOT_ENKUlOS2_E_clESF","s+":"2D"}
        Frame: {"a":"1024920E0","b":"102406000","o":"8C0E0","s":"_ZN5mongo9transport19ServiceStateMachine4Impl12startNewLoopERKNS_6StatusE","s+":"110"}
        Frame: {"a":"1024973DF","b":"102406000","o":"913DF","s":"ZZN5mongo15unique_functionIFvNS_6StatusEEE8makeImplIZNS_9transport19ServiceStateMachine4Impl15scheduleNewLoopES1_E3$_7EEDaOT_EN12SpecificImpl4callEOS1","s+":"5F"}
        Frame: {"a":"104974590","b":"102406000","o":"256E590","s":"ZZN5mongo15unique_functionIFvNS_6StatusEEE8makeImplIZNS_9transport26ServiceExecutorSynchronous18runOnDataAvailableERKNSt3110shared_ptrINS5_7SessionEEES3_E3$_5EEDaOT_EN12SpecificImpl4callEOS1","s+":"40"}
        Frame: {"a":"104970ED9","b":"102406000","o":"256AED9","s":"_ZZN5mongo9transport15ServiceExecutor8scheduleENS_15unique_functionIFvNS_6StatusEEEEENUlvE_clEv","s+":"39"}
        Frame: {"a":"10497423C","b":"102406000","o":"256E23C","s":"_ZZN5mongo15unique_functionIFvvEE8makeImplIZNS_9transport26ServiceExecutorSynchronous12scheduleTaskES2_NS4_15ServiceExecutor13ScheduleFlagsEE3$_4EEDaOT_EN12SpecificImpl4callEv","s+":"18C"}
        Frame: {"a":"104975088","b":"102406000","o":"256F088","s":"ZN5mongo12_GLOBAL_N_17runFuncEPv","s+":"18"}
        Frame: {"a":"7FF81477D4E1","b":"7FF814777000","o":"64E1","s":"_pthread_start","s+":"7D"}
        Frame: {"a":"7FF814778F6B","b":"7FF814777000","o":"1F6B","s":"thread_start","s+":"F"}

      Additional Notes

      Any additional information that may be useful to include.

        1. 636311e6ebe2dd0a023ea848_log.gz
          12 kB
          Felicia Hsieh
        2. Screen Shot 2022-11-02 at 7.40.07 PM.png
          238 kB
          Felicia Hsieh
        3. Screen Shot 2022-11-02 at 7.46.38 PM.png
          89 kB
          Felicia Hsieh
        4. Screen Shot 2022-11-02 at 7.52.38 PM.png
          119 kB
          Felicia Hsieh

            Assignee:
            Unassigned Unassigned
            Reporter:
            felicia.hsieh@mongodb.com Felicia Hsieh
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: