Skip to content

Email alerts hitting Resend rate limit (2 req/s) #39

Description

@louis030195

Problem

Email alerts are failing due to Resend API rate limiting:

2025-12-01 23:31:24.612 [info] Sending email with from: "alerts@alerts.mediar.ai"
2025-12-01 23:31:24.678 [error] Resend error: {
  statusCode: 429,
  name: 'rate_limit_exceeded',
  message: 'Too many requests. You can only make 2 requests per second. See rate limit response headers for more information. Or contact support to increase rate limit.'
}

Root Cause

Resend free/starter tier limits to 2 requests per second. When multiple workflow executions fail simultaneously (e.g., batch runs), we exceed this limit.

Potential Solutions

  1. Queue emails with rate limiting - Implement a simple queue that throttles to 1-2 emails/second
  2. Batch/aggregate alerts - Combine multiple failures into a single email (e.g., "3 workflows failed in the last minute")
  3. Upgrade Resend plan - Higher tiers have increased rate limits
  4. Add retry with exponential backoff - Retry failed emails after delay

Impact

Alert emails may be lost when multiple executions fail at the same time, reducing visibility into workflow failures.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions