- Newest
- Most votes
- Most comments
Below the similar discussion you may referring to with some suggestions:
- Stop sending too many messages on a single SMTP connection. Reconnect after N messages where N is comfortably below the observed failure point. Common safe values used in the field are 250–500 messages per connection. Reconnect more often if you still see 421 errors.
- Add retries with exponential backoff when you receive 421. On retry, open a fresh SMTP connection and resume sending the remaining messages.
- Limit batch sizes and/or parallelism so no single process tries to send hundreds or thousands of messages on the same connection.
- If possible, switch to the SES HTTP API (SendEmail or SendBulkTemplatedEmail) which avoids SMTP connection limits and is better suited for many sending workloads.
The error message "421 Connection closed by server. Maximum message count per session reached" indicates that you've hit a limit on the number of messages that can be sent in a single SMTP session, not your overall daily sending quota.
This is different from your daily sending quota of 50,000 emails or your maximum send rate of 14 emails per second. When using SMTP with Amazon SES, there's a limit to how many messages you can send in a single connection session before you need to disconnect and establish a new connection.
The free tier notification you received (2,740 out of 3,000 limit) is related to the AWS Free Tier for SES, which allows you to send 3,000 messages per month for free when sending from an Amazon EC2 instance. Once you exceed this limit, you'll be charged for additional messages, but the service will continue to work - this is not related to your current error.
To resolve your issue:
- Modify your newsletter tool's SMTP implementation to close and reestablish the SMTP connection after sending a batch of messages (typically after 50-100 messages)
- Ensure your application handles reconnection properly
- Consider implementing a backoff strategy if you encounter throttling errors
Your daily quota of 50,000 emails is still available, and your sending rate of 14 emails per second is still valid. This is purely a session-level limitation that requires you to manage your SMTP connections differently.
Sources
Errors related to the sending quotas for your Amazon SES account - Amazon Simple Email Service
Errors related to the sending quotas for your Amazon SES account - Amazon Simple Email Service
AWS SES Daily quota dashboard not refreshing | AWS re:Post
Amazon SES email sending errors - Amazon Simple Email Service
Relevant content
- AWS OFFICIALUpdated a month ago
