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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T16:40:19+00:00 2026-06-04T16:40:19+00:00

My Rails application generates a ~10MB response dynamically like so: self.status_code = 200 self.response-body

  • 0

My Rails application generates a ~10MB response dynamically like so:

self.status_code = 200
self.response-body = Enumerator.new { |y| ... }

Starting the application in development mode via unicorn_rails I can curl http://127.0.0.1:3000/foo > /dev/null and see the response being streamed to the client via the progress feedback. When using rails server (which starts webrick), no streaming takes place and I see the progress sitting there, then jumping from 0% to 100%.

Yet when deploying on staging/production, unicorn sits behind nginx and a unix socket. IN that configuration, the similar curl http://staging/foo > /dev/null sees the progress sitting at 0% as the data gets generated, then from 0% to 100% as it gets transferred, just as if there was no streaming. Indeed by looking at the server logs aside I can see that curl sits waiting the whole time the request is generated, and as soon as the request completes, curl trickles up as it receives the data.

My supposition is that something (nginx or whatever) buffers the whole request somewhere before actually sending it to the client.

For now I have played with proxy_buffering off in the nginx configuration, and the X-Accel-Buffering HTTP response header to no avail. I have also bumped nginx 0.7 of Ubuntu 10.04 to 1.2 from the semi-official ppa.

  • 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-04T16:40:21+00:00Added an answer on June 4, 2026 at 4:40 pm

    It turned out 10738118 was at the root of the behavior. Indeed, absence of Last-Modified in the response triggers buffering somewhere in Rails/Rack.

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

Sidebar

Related Questions

I'm using a Rails application and would like to send/receive text messages through my
I have a rails application, running in development mode ( with a sqlite database
I have a Rails application that generates a weekly report and emails it out.
I'm new to rails application. I got connection with mongodb using mongoid. I generated
My Rails application has a number of tasks which are offloaded into background processes,
My Rails application makes use of Time.zone so that each user can set their
In my present Rails application, I am resolving scheduling conflicts by sorting the models
I have a rails application that about 3 years old, and I'm having a
I'm implementing a Rails application in which users will be able to store snippets
We are writing a Rails application that is using CouchDB as its data store.

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.