Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8456667
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T12:36:16+00:00 2026-06-10T12:36:16+00:00

I have a send mail to all users that send one email per user.

  • 0

I have a send mail to all users that send one email per user.

The function works, but I get an ugly error message on the web app. On the logs i get

2012-08-28T12:08:03+00:00 heroku[router]: Error H12 (Request timeout) -> POST afternoon-spring-6294.herokuapp.com/welcome/wall dyno=web.1 queue= wait= service=30000ms status=503 bytes=0
[...]
Sent mail to xxxx@xxxxx.xxxx (1708ms)
2012-08-28T12:08:31+00:00 app[web.1]: Redirected to http://afternoon-spring-6294.herokuapp.com/
2012-08-28T12:08:31+00:00 app[web.1]: Completed 302 Found in 58114ms (ActiveRecord: 8.9ms)

Is there a workaround (it was triggered by only 33 emails)?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T12:36:18+00:00Added an answer on June 10, 2026 at 12:36 pm

    Heroku reaps all process that run longer than 30s, which means almost any batch email through something like mailgun or sendgrid will get killed with the H12 error.

    There’s a couple of basic ways to handle, but all involve making things more asynchronous. Heroku worker processes can run indefinitely — or at least FAR longer than 30s.

    The traditional option is to use a queue — delayed_job is dead simple and only needs a database to back it. Resque is also cool but requires Redis to be added to the mix. There are also MANY more sophisticated options but delayed_job is dead simple. Railscasts is probably your friend here to figure out how to do it.

    Another option is to use a worker process to handle the email tasks directly. For example, you can use a worker to send email in batches every X minutes using a rake task. This is sort of queue without all the overhead. Let’s say you need to send a batch of invitations, you write invitations with an unsent status to a table, then have a rake task pop the first one off and send it, repeat until done. You’d be basically reimplementing a simple queue but might feel more comfortable.

    Personally I’d put in delayed_job until I needed something more powerful.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have send an email using php mailer class. mail was sending successfully but
I have used default mail() function to send email it sends emails to yahoo
i have function to send mail with attachment to microsoft exchange server. My problem
I have following condition: How do I send email to example@mail.com on submitButton clicklistener
I have like 50 different php files which all use the mail function. After
I'm developing a site that sends email notifications to users after certain events/user actions
I'm preparing a website that will send email notifications to registered users. From my
For my app I have to send a mail with a photo (I'm using
I could send mail from my Activity when i have already configured with any
I have built a feedback page.I am trying to send mail from the page.The

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.