Skip to content

fix(ssh): cap consecutive connection failures COMPASS-10804 - #8211

Merged
ivandevp merged 1 commit into
mainfrom
HELP-96049-bump-devtools-proxy-support
Jul 6, 2026
Merged

fix(ssh): cap consecutive connection failures COMPASS-10804#8211
ivandevp merged 1 commit into
mainfrom
HELP-96049-bump-devtools-proxy-support

Conversation

@ivandevp

@ivandevp ivandevp commented Jul 6, 2026

Copy link
Copy Markdown
Collaborator

Description

Bumps @mongodb-js/devtools-proxy-support from ^0.7.15 to ^0.7.17 across all packages that depend on it, picking up the SSH session leak fix from devtools-shared#809.

Checklist

  • New tests and/or benchmarks are included
  • Documentation is changed or added
  • If this change updates the UI, screenshots/videos are added and a design review is requested
  • If this change could impact the load on the MongoDB cluster, please describe the expected and worst case impact
  • I have signed the MongoDB Contributor License Agreement (https://www.mongodb.com/legal/contributor-agreement)

Motivation and Context

Fixes COMPASS-10804: when a machine hibernates and resumes, the MongoDB driver retries heartbeat connections concurrently. Without the fix, each concurrent _connect() caller bypassed the connectingPromise deduplication guard and raced through initialize(reinitializeClient=true), each creating a new ssh2 client and a new server-side SSH session. N-1 of these were immediately orphaned per retry cycle, accumulating unboundedly until the bastion ran out of RAM (customers reported 300+ dangling sessions within hours).

The fix in devtools-proxy-support 0.7.17 serializes concurrent reinit attempts via reinitializingPromise so only one new ssh2 client is created per cycle, and stops retrying entirely after 3 consecutive failures (closed = true).

  • Bugfix
  • New feature
  • Dependency update
  • Misc

Open Questions

None.

Dependents

Depends on: mongodb-js/devtools-shared#809

Types of changes

  • Backport Needed
  • Patch (non-breaking change which fixes an issue)
  • Minor (non-breaking change which adds functionality)
  • Major (fix or feature that would cause existing functionality to change)

Picks up the fix for COMPASS-10804: concurrent SSH reinit attempts were
racing to each create a new ssh2 client, leaving N-1 orphaned server-side
sessions per MongoDB driver retry cycle. After a machine hibernate,
sessions accumulated unboundedly until the bastion ran out of RAM.

The fix serializes concurrent reinit via `reinitializingPromise` and
stops retrying after 3 consecutive failures (`closed = true`).
@ivandevp
ivandevp requested a review from a team as a code owner July 6, 2026 13:54
@ivandevp
ivandevp requested a review from nbbeeken July 6, 2026 13:54
@ivandevp ivandevp changed the title chore(deps): bump @mongodb-js/devtools-proxy-support to 0.7.17 (COMPASS-10804) chore(deps): bump @mongodb-js/devtools-proxy-support to 0.7.17 COMPASS-10804 Jul 6, 2026
@ivandevp ivandevp self-assigned this Jul 6, 2026
@mabaasit

mabaasit commented Jul 6, 2026

Copy link
Copy Markdown
Collaborator

This should be a fix instead of a chore, with a proper title to highlight ssh issue

@ivandevp ivandevp changed the title chore(deps): bump @mongodb-js/devtools-proxy-support to 0.7.17 COMPASS-10804 fix(ssh): cap consecutive connection failures COMPASS-10804 Jul 6, 2026
@ivandevp ivandevp added the fix label Jul 6, 2026
@ivandevp
ivandevp merged commit 7c8ffb3 into main Jul 6, 2026
70 of 71 checks passed
@ivandevp
ivandevp deleted the HELP-96049-bump-devtools-proxy-support branch July 6, 2026 16:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants