421 4.7.0: connection expired
Gmail closed an SMTP connection that had been open too long, and asks your server to open a new one and send again.
- Gmail
- Provider
- Temporary (4xx)
- Class
- Sources checked
- Author
At a glance
- Code
- 421 4.7.0
- Provider
- Gmail and Google Workspace
- Temporary or permanent
- TemporaryThe sending server keeps the message and tries again later.
- Who has to act
- The sender. The fix is on the sending side: your domain, your server or your list.
- What the server says
421 4.7.0 Connection expired, try reconnecting.
What it means
Gmail does not keep a connection open indefinitely. A sending server that holds one session open to push many messages, or leaves it idle between messages, is eventually told that the connection has expired. The reply is temporary and says nothing about the message itself; the fix is to reconnect. Mail servers do this on their own, opening a fresh connection and retrying. Custom code and connection pools that keep a single connection alive for long periods should expect this reply and reconnect when they see it. Google's relay documentation notes that connections to smtp-relay.gmail.com can stay open for up to 10 minutes.
Common causes
- A connection held open for a long time to send many messages in a row.
- An idle connection kept open between messages by a connection pool.
How to fix it
- 01Let your server reconnect and retry; most mail servers do this automatically.
- 02In custom code or connection pools, close connections after a set time or number of messages and open new ones.
- 03Treat this reply as a signal to reconnect, and send the message again on the new connection.
Sources
What this page rests on, checked on 20 Oct 2026. The explanation is ours; the reply text is the server's.
- Gmail SMTP errors and codes (Google Workspace Admin Help)knowledge.workspace.google.com
- SMTP relay service error messages (Google Workspace Admin Help)knowledge.workspace.google.com
Related codes
- 421Service not available.The receiving server is closing the connection and will not take mail right now. The reply is temporary, so the sending server keeps the message and tries again later.
- 5.7.0Security or policy refusal, unspecified.The message or session was refused for a security or policy reason that the server did not describe more precisely, or chose not to reveal.
All 108 Gmail codesEvery code in the wikiPaste your own bounce