# 421 4.3.2 idle too long

> The SMTP connection sat open with no command for 30 seconds, so PostShiba closed it. This is not throttling.

When a client connects to `smtp.postshiba.com` and then stops talking, PostShiba waits 30 seconds for the next SMTP command. After that it answers `421 4.3.2 smtp.postshiba.com idle too long` and closes the connection. No message was in flight on that connection, so nothing is lost. Messages you sent on it earlier were already accepted.

## Why it happens

The usual cause is a connection pool that opens SMTP connections ahead of time, or keeps them open between messages, for longer than 30 seconds:

- A mailer that opens one connection at boot and reuses it for every message, with long gaps between sends.
- A pool such as Nodemailer `pool: true`, PHPMailer `SMTPKeepAlive`, or a Java `Transport` that is connected once and kept around.
- A worker that connects, then does slow work (rendering, database queries, HTTP calls) before `MAIL FROM`.
- A health check or monitor that opens a connection and never sends `QUIT`.

## How to fix it

Pick one:

1. **Connect per message or per batch.** Open the connection, send, then send `QUIT`. Most framework mailers do this by default.
2. **Keep pooled connections idle for less than 30 seconds.** Set the pool's idle timeout to 20 seconds or less, for example `socketTimeout: 20000` on a Nodemailer transport with `pool: true`, so the client closes idle connections before PostShiba does.
3. **Reconnect on 421.** A `421` reply means "close and try again". A well-behaved client opens a fresh connection for the next message.

Render the message before you connect, not between `EHLO` and `MAIL FROM`.

## How to tell it from throttling

Throttling has different replies, and they arrive at `MAIL FROM` or `DATA` while a message is being sent:

| Reply | Meaning |
| --- | --- |
| `421 4.3.2 ... idle too long` | The connection was idle for 30 seconds. Reconnect. Not a limit. |
| `451 4.7.0 hourly send limit reached` | The cluster hit its hourly cap. See [What happens at your cap](/docs/dashboard/clusters/what-happens-at-your-cap). |
| `451 4.7.0 daily send limit reached` | The cluster hit its 24-hour cap. |
| `451 4.4.5 too many sessions, slow down` | One SMTP credential opened too many new sessions in 10 seconds. Reuse connections or slow down. |

If you see `idle too long`, your sending volume is fine. Your client just held a connection open without using it. A `421 4.3.2` without `idle too long` at connect time means the SMTP host is at its connection limit; retry after a short wait.

## Next steps

- [Send emails with SMTP](/docs/send-with-smtp)
- [AUTH PLAIN, not AUTH LOGIN](/docs/knowledge-base/auth-plain)
- [Errors](/docs/api-reference/errors)
