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 8480515
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T19:18:54+00:00 2026-06-10T19:18:54+00:00

I have a method in my rails app that makes about a 1000 REST

  • 0

I have a method in my rails app that makes about a 1000 REST calls. Unfortunately, it crashed pretty quickly because of a timeout:

Error H12 (Request timeout) -> POST MyApp.herokuapp.com/expensiveCall dyno=web.1 queue= wait= service=30000ms status=503      

How do I avoid this timeout? Should I be careful of anything along these lines? (Making this call is pretty costly – so looking for things I should avoid).

Thanks!

Edit
Also, would it be a good idea to launch a thread that would make those 1000 REST calls rather having the request wait for completion. If so, how could I do that?

  • 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-10T19:18:56+00:00Added an answer on June 10, 2026 at 7:18 pm

    You’re going to need to put this into a background job of some sort. You can use something like delayed_job, or resque. Delayed Job is tool that you can use in rails to create a job that can be performed at another time, or put into a queue. Delayed Job has a fairly similar interfance in some respects to that of active record. Checkout the readme on the link there for setting it up. I’ve heard good things about resque which also allows you to do that, but I have no experience in using it.

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

Sidebar

Related Questions

In my Rails app I have a helper method location that gets the coordinates
I have a custom accessor method in my rails 3.1.6 app that assigns a
I currently have the following controller method in a Rails app: def index @entries
What is analog in datamapper for .present? method? I have code from rails app
I have a Rails method that just returns a string, and for some reason,
In Rails 3.0.9 (Ruby 1.9.2, MySQL) I have a method that is supposed to
In my rails project I have a presenter method that has a helper view
In Ruby on Rails, I have an update method in a controller, that is
I have a Rails engine that defines a class method top(count) on a model
I have this method form a Rails 2.3.4 app: def self.find_all_colored(query, options={}) finder_options =

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.