I’ve run into a strange issue with Mailgun. For the past couple of days, I’ve been getting a new error code when I try to fetch events from their API. The response includes a delivery status with code 602 and a message saying ‘Too old’. Here’s what the response looks like:
{
"delivery-status": {
"attempt-no": 5,
"message": "Too old",
"code": 602,
"description": "",
"session-seconds": 0
}
}
I’m not sure what this ‘Too old’ message means. I’ve looked through their docs but can’t find any info about this error code. Has anyone else run into this? Any ideas what it could mean or how to fix it? It’s really throwing a wrench in my workflow.
I encountered a similar issue with Mailgun a few months ago. The 602 error code indeed relates to message age. Mailgun retains event data for only 3 days by default. To resolve this, you’ll need to adjust your API requests to fetch more recent events. For long-term data retention, consider implementing a local storage solution or database to archive event data as it comes in. This way, you’ll have access to historical data beyond Mailgun’s retention period. Additionally, you might want to check if you’re on a plan that offers extended data retention, as some higher-tier plans provide longer storage periods.
I’ve dealt with this Mailgun issue before, and it can be frustrating. The 602 error is definitely about message age. Mailgun’s default retention policy is pretty short - just 3 days. If you’re trying to fetch older events, you’ll hit this wall.
Here’s what worked for me: I set up a daily cron job to pull recent events and store them in my own database. This way, I have access to historical data whenever I need it, without relying on Mailgun’s limited retention.
Also, check your API calls. Make sure you’re not accidentally requesting data from too far back. Adjusting your date range parameters might solve the immediate problem.
If you absolutely need longer retention directly from Mailgun, you might want to look into their enterprise plans. They offer extended data storage, but it comes at a premium. Weigh the costs against setting up your own storage solution.
hey, i’ve seen that error before. it usually means the message you’re trying to fetch is too old for mailgun to retrieve. they only keep events for a limited time (like 3 days i think?). maybe try requesting more recent events? if u need older data, you might need to store it yourself going forward.