257 — TransactionTooLarge

networkingconnectivity

DNS resolution failed for the specified hostname

What is happening?

DNSHostNotFound is returned when a DNS lookup for a hostname in the connection string or SRV record fails completely. Unlike HostNotFound (7) which can occur at the TCP level, this error specifically indicates the DNS resolver returned NXDOMAIN or a similar negative response. It is common with mongodb+srv:// connection strings when the SRV or TXT records are missing.

Common causes

  1. Incorrect cluster hostname in the connection string
  2. SRV record does not exist for the specified mongodb+srv:// domain
  3. DNS server is unreachable or not responding
  4. Private DNS zone not accessible from the application's network
  5. Cluster was deleted but the connection string was not updated

Source code references

ErrorCodes::TransactionTooLarge found in 14 locations in the MongoDB server source.

Diagnostic Steps