# 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

1. Check the Connections metric against the tier limit. Free (M0) and Flex clusters have low caps; this is by design.
2. Count clients: instances x pools, plus any per-request client creation bug, plus open mongosh sessions and tools.

## Fix, in order

1. One client per process, small pools on serverless (1 to 5). Most "limit" problems are actually client-count bugs.
2. Close idle clients and sessions; check for leaked cursors holding connections.
3. 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.