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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T19:32:23+00:00 2026-05-25T19:32:23+00:00

I have a ROR app on heroku.There are 8 optional text fields on the

  • 0

I have a ROR app on heroku.There are 8 optional text fields on the app, user can fill it or let it be empty according to their requirements.

The more text fields user fill, the more processes my app needs to do. My app will process the request more than 30s if there are more than 5 fields be filled and it will cause Heroku timeout.

Is there any solution to deal with this problem?

I heard that using javascript and ajax can divide a request into two parts, I think it will avoid the timeout problem. However, I am not sure how to do it.

Thanks!

  • 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-05-25T19:32:24+00:00Added an answer on May 25, 2026 at 7:32 pm

    You just need to do the processing as a background job. On Heroku it’s super easy. Use Resque + Redis, but you can also use DelayedJob. Resque (built by github) is a queueing layer on top of Redis (a key value store). It’s much easier to scale than doing queuing with DelayedJob, but either way works.

    1. First, install the free Heroku Redis to Go addon.
    2. Then just follow Redis To Go’s Resque with Redis on Heroku blog Post to setup the gems and such.

    Once that’s setup, here’s all you need to do:

    1. Post the form data.
    2. Save it unprocessed to be processed later.
    3. Tell Resque that you’ve added something to the queue.

    If your form is a user creation form, the code might be like this:

    module SaveUser
      @queue = :save_user
    
      def perform(attributes = {})
        user = User.create(attributes)  
        user.process! if user && !user.processed_everthing?
      end
    end
    
    def create
      Resque.enqueue(SaveUser, params[:user])
    end
    

    … you could also write it like the following (storing only the id in the queue, not the params)

    module SaveUser
      @queue = :save_user
    
      def perform(id)
        user = User.find(id)
        user.process! if user && !user.processed_everthing?
      end
    end
    
    def create
      user = User.create(params[:user])  
      Resque.enqueue(SaveUser, user.id)
    end
    

    By queuing up everything, the user will be almost immediately taken to the next page.

    If the user needs to see the result of the processing immediately on the next page, however, you’re just going to have to figure something else out.

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

Sidebar

Related Questions

I have recently moved my RoR app on the Heroku platform, and almost everything
I'm pretty new to ROR. I've recently deployed an app on heroku and have
I currently have an RoR app in production across four application servers with independent
So I have this in my RoR app, it works in FF, Chrome, and
i have an RoR application Log, which similar to the book store app, my
I have a RoR app running rails 2.3.8 which makes use of the Rails
I have my RoR app on FTP and if I open some file through
I have a RoR web app that I'm trying to serve up with Passenger
In my RoR app, I have a query that could return anywhere 0 to
I have a list view in my RoR web app. The view is a

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.