# Send\_file problem

**URL:** <https://www.ruby-forum.com/t/send-file-problem/72608>\
**Category:** Rails\
**Created:** [October 18, 2006, 10:38am UTC](https://www.ruby-forum.com/t/send-file-problem/72608 "2006-10-18T10:38:56Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lionel\_B](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/74df32/32.png) [@Lionel\_B](https://www.ruby-forum.com/u/Lionel_B)\
**Post date:** [October 18, 2006, 10:38am UTC](https://www.ruby-forum.com/t/send-file-problem/72608/1 "2006-10-18T10:38:56Z")

</div>

I’m using Rails 1.1.6 and have a weird problem with send\_file both with  
Webrick and Mongrel\_rails.

Even though the documentation explicitely tells that the file is  
streamed to the client, webrick or mongrel process sizes are growing to  
~300MB when I use send\_file with a ~256MB file.  
Adding :stream =\> true (I tried even though it is the default) doesn’t  
change anything.

Is send\_file known to be broken ?

Lionel.

---

<div class="post-metadata">

**Author:** ![Lionel\_B](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/74df32/32.png) [@Lionel\_B](https://www.ruby-forum.com/u/Lionel_B)\
**Post date:** [October 18, 2006, 10:38am UTC](https://www.ruby-forum.com/t/send-file-problem/72608/2 "2006-10-18T10:38:58Z")

</div>

On 10/12/06, Lionel B. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Is send\_file known to be broken ?  
> Mongrel buffers the Rails response before sending it, so streaming is  
> useless. Use the X-Sendfile header if your Mongrel is fronted by Apache2  
> or  
> Lighttpd.

jeremy

---

<div class="post-metadata">

**Author:** ![Lionel\_B](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/74df32/32.png) [@Lionel\_B](https://www.ruby-forum.com/u/Lionel_B)\
**Post date:** [October 18, 2006, 10:44am UTC](https://www.ruby-forum.com/t/send-file-problem/72608/3 "2006-10-18T10:44:06Z")

</div>

X-Sendfile doesn’t work with lighttpd-1.4.13’s mod\_proxy (nor does the  
X-LIGHTTPD-send-file header). I only managed to make it work with  
mod\_fastcgi → no X-Sendfile with mongrel and lighttpd.

BTW, I’m really pissed off by google’s handling of the list. As my  
message didn’t come back to me, I checked on [groups.google.fr](http://groups.google.fr) and there  
was my message with an answer although more than 30 hours later my  
mailbox is still waiting. I’ve seen other reports of such behaviour  
before, it seems some members are out of luck for unknown reasons (if  
someone knows, please enlighten me).
