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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T11:54:48+00:00 2026-06-13T11:54:48+00:00

I am working on a rails application where users upload some videos. Apache with

  • 0

I am working on a rails application where users upload some videos. Apache with passenger is my server. The videos can be as big as 500MB or 1 GB. After the video is uploaded it is converted to mp4 and played.

I am using https://github.com/valums/file-uploader to upload the files. With this i can upload as large as a 500MB video file easily. I want to display the mp4 preview of the video as soon as the upload is complete. I am using ffmpeg to process convert the video to mp4. This conversion may take as long as 10+ minutes some times and my request times out after 5 mins due to the default apache timeout.

So, the problem here is the ajax upload keeps the request alive only till 5 minutes after the upload to complete. I need the request to stay alive for about 10-20 minutes after the file upload is complete. It would be great to know in case any other javascipt based solutions available to keep this request alive till the video processing completes and the preview can be shown to the user.

  • 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-13T11:54:49+00:00Added an answer on June 13, 2026 at 11:54 am

    Keeping a blocking request until the video is transcoded can burden your servers. Most servers can handle 40-80 concurrent requests concurrently, depending on the memory footprint of your Rails stack, gems installed, and Apache server setting. If you allow 10 minutes requests, this means that 40 users who are uploading simultaneously could take down your service.

    My suggestion is using Ajax to poll your Rails server every few seconds if the job is done transcoding. If it does, you can refresh the page or add some more javascript to initalize the video playback.

    window.setInterval( function() {
      $.get('video_path').done(function(data, code, xhr) {
        location.reload(); // or some code for playing back the video
      });
    }, 2000);
    

    Another similar solution could use a third party service like Pusher or PubNub which allow browsers to maintain persistent connection, and then allow your Rails server to notify the clients once an event is fired. Push services like these usually use Node.Js for better asynchronous handling and maintaing many open connections concurrently.

    Third option would be to switch Apache to Puma and use Rails new streaming APIs. Puma is better suited to handling concurrency.

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

Sidebar

Related Questions

I'm working on a Rails application where I have users that can add each
I am working on a Rails application where users can add posts without registration.
The Rails application I'm working on, has two central pieces: users and groups. A
I'm working on a Rails 3.2 application that will allow users to authenticate with
I'm working on a Rails application where I have some a set of two
I'm working on a Rails application that allows users to define Tasks, which require
I am working on a rails application that uses big javascript libraries (e.g. jquery
The application I'm working on allows users to upload HTML templates with CSS, which
I'm working on a Rails application with some budget features... What i want to
Newbie working on his first rails application after studying Hartl's Rails Tutorial book &

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.