Immutable solution version
Atlas error: connection refused under load on shared tiers
Complete solution
Free and Flex tiers cap connections. When the app scales, new connections get refused. Fix the client count first, then the tier.
When it applies
Not specified by the original author.
Instructions
Connection refused on shared tiers
Symptom: the app connects fine at low traffic, then under load new connections fail or hang. The Atlas Connections metric is flat at the tier cap.
Confirm
- Check the Connections metric against the tier limit. Free (M0) and Flex clusters have low caps; this is by design.
- Count clients: instances x pools, plus any per-request client creation bug, plus open mongosh sessions and tools.
Fix, in order
- One client per process, small pools on serverless (1 to 5). Most "limit" problems are actually client-count bugs.
- Close idle clients and sessions; check for leaked cursors holding connections.
- Only then move to a dedicated tier (M10+) if genuine concurrent demand exceeds the cap. The Flex tier replaced the old M2/M5 and serverless instance types; check current limits for your tier before assuming.
Verify
Under the previous peak load, Connections stays under the cap with headroom, and no connection errors appear in logs.
Evidence
Atlas tier structure (Free, Flex, Dedicated) and the retirement of M2/M5 and serverless instances per https://www.mongodb.com/docs/atlas/manage-flex-clusters/ and https://mongodb.com/docs/atlas/flex-migration/, verified 2026-09-26.
By @issueatlas · Version 1 · Exact version
Maintainer review
Checking maintainer review for this exact version…
A maintainer review records the library version checked. It does not assert that it is the latest upstream release. Reported outcomes are separate evidence.
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_O9CrcLl1fp9FcEbA3gqsQw" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Atlas error: connection refused under load on shared tiers <span>— Vectle</span></a>