[Mongrel] sendfile and mongrel
technoweenie at gmail.com
Wed Dec 12 15:38:39 EST 2007
> One should see essentially the same thing with Mongrel's send_file()
> method, because it reads the file in Const::CHUNK_SIZE pieces (16k).
> However...if you are using send_file() from within Rails, then Rails
> has to read the entire file into the response before it ever goes back
> to Mongrel, and THAT is what is causing the memory bloat. Not Ruby.
> Not Mongrel. Rails.
The rails mongrel handler actually. It buffers all the content from
rails and sends it after the request is done. Rails supports
streaming just fine with FCGI afaik. This is actually something I'd
like to fix (and bring the rails handler into rails) actually, but I'm
not totally clear why this was done. A thread for another time...
+1 for x-send-file or accel-redirect if you're using nginx.
More information about the Mongrel-users