[COMPASS-4830] Compass opening extra connections that remain opened (Node Worker Runtime is not closed properly) Created: 15/May/21  Updated: 29/Oct/23  Resolved: 10/Jun/21

Status: Closed
Project: Compass
Component/s: Compass
Affects Version/s: 1.26.1
Fix Version/s: 1.27

Type: Bug Priority: Major - P3
Reporter: Jerome Cuny Assignee: Sergey Petushkov
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

macOS Catalina v 10.15.7


Attachments: PNG File connection log.png     PNG File connection number.png     PNG File running jobs.png     PNG File screenshot-1.png    
Issue Links:
Related
related to COMPASS-2720 Compass opens external connections wh... Closed
is related to COMPASS-4831 Compass opening extra connections tha... Closed
Story Points: 3
Documentation Changes: Not Needed
Sprint: Iteration Edinburgh

 Description   

Problem Description

I am trying to run MongoDB Compass on my mac to have a better visualization of my local database. 

No problem of connections, but Compass generates extra polluting connections that still remain after closing it.

Expected Results

Using one mongo shell and one MongoDB Compass GUI, i am expecting to get "current: 2" when i run : db.serverStatus().connections

Actual Results

I have added a screenshots of the issue for a better understanding.

For the moment i have to manually close all the MongoDB Compass Helper (Renderer) jobs from the Activity Monitor.Additional Notes



 Comments   
Comment by Githook User [ 15/Jun/21 ]

Author:

{'name': 'Sergey', 'email': 'petushkov.sergey@gmail.com', 'username': 'gribnoysup'}

Message: feat(@mongodb-js/compass-home, mongodb-compass): Replaces compass-*-ddl plugins, with compass-databases-collections COMPASS-4830 (#2240)

  • feat(@mongodb-js/compass-home, mongodb-compass): Replaces compass- {databases,collections}

    -ddl plugins, with compass-databases-collections

Co-Authored-By: Anemy <rhysh@live.com>

  • fix(@mongodb-js/compass-databases-collections): Render false as a stringified value in Select box so that it can be selected in UI
  • fix(@mongodb-js/compass-databases-collections): Move expireAfterSeconds to the root level of collection fields

While at it, refactor form values to options transformation so that `buildOptions`
are the only place where field values are normalized

Co-authored-by: Anemy <rhysh@live.com>
Branch: npm-workspaces
https://github.com/mongodb-js/compass/commit/84fd129c7acec37677d1330327e99b7e2bb24aaa

Comment by Githook User [ 14/Jun/21 ]

Author:

{'name': 'Sergey', 'email': 'petushkov.sergey@gmail.com', 'username': 'gribnoysup'}

Message: feat(@mongodb-js/compass-home, mongodb-compass): Replaces compass-*-ddl plugins, with compass-databases-collections COMPASS-4830 (#2240)

  • feat(@mongodb-js/compass-home, mongodb-compass): Replaces compass- {databases,collections}

    -ddl plugins, with compass-databases-collections

Co-Authored-By: Anemy <rhysh@live.com>

  • fix(@mongodb-js/compass-databases-collections): Render false as a stringified value in Select box so that it can be selected in UI
  • fix(@mongodb-js/compass-databases-collections): Move expireAfterSeconds to the root level of collection fields

While at it, refactor form values to options transformation so that `buildOptions`
are the only place where field values are normalized

Co-authored-by: Anemy <rhysh@live.com>
Branch: 1.27-releases
https://github.com/mongodb-js/compass/commit/84fd129c7acec37677d1330327e99b7e2bb24aaa

Comment by Githook User [ 14/Jun/21 ]

Author:

{'name': 'Sergey', 'email': 'petushkov.sergey@gmail.com', 'username': 'gribnoysup'}

Message: feat(@mongodb-js/compass-home, mongodb-compass): Replaces compass-*-ddl plugins, with compass-databases-collections COMPASS-4830 (#2240)

  • feat(@mongodb-js/compass-home, mongodb-compass): Replaces compass- {databases,collections}

    -ddl plugins, with compass-databases-collections

Co-Authored-By: Anemy <rhysh@live.com>

  • fix(@mongodb-js/compass-databases-collections): Render false as a stringified value in Select box so that it can be selected in UI
  • fix(@mongodb-js/compass-databases-collections): Move expireAfterSeconds to the root level of collection fields

While at it, refactor form values to options transformation so that `buildOptions`
are the only place where field values are normalized

Co-authored-by: Anemy <rhysh@live.com>
Branch: master
https://github.com/mongodb-js/compass/commit/84fd129c7acec37677d1330327e99b7e2bb24aaa

Comment by Michael Rose (Inactive) [ 31/May/21 ]

Great for reporting that issue! We drilled down and could find the following:

  1. The connections that are leaked seem to come from the embedded shell inside Compass (the increment of stale connections is always 3 which correlates with what mongosh itself uses initially)
  2. The leak can easily be reproduced by connecting to a server and disconnecting (the connections is then stale)
  3. Investigation shows that the child-process-proxy.js from node-worker-runtime is still running.

Generated at Wed Feb 07 22:37:34 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.