[Mongrel] Uploading Large (100mb+) files

Zed A. Shaw zedshaw at zedshaw.com
Tue Nov 28 15:21:24 EST 2006


On Tue, 28 Nov 2006 13:35:32 -0600 (CST)
Philip Hallstrom <mongrel at philip.pjkh.com> wrote:

> > I have an Apache 2.2.3 (mod_proxy_balancer) frontend server that does
> > not have mongrel installed. It does proxy requests to several other
> > mongrel-only servers (each running 2 mongrel processes). Each mongrel
> > node has the same rails code-base and it's working perfectly.
> >
> > However, my question is when I add an upload file form... where is it
> > going to physically put that file? I mean since it's hitting either one
> > node or the other, so how does mongrel deal with that? and how or where
> > do I tell it to accept large files (100mb+) ?
> 
> Others have given good advice on how to do it, but wanted to say you don't 
> need to do anything to get it to accept 100mb files.  We do that quite a 
> bit and while it takes awhile works just fine.  It does tie up a mongrel 
> process, but we're okay with that.

Quick clarification to what Philip said:  The actual upload doesn't block mongrel since it's done in a thread before rails gets the uploaded body.  Now, once Rails gets it the cgi.rb multipart mime processing is run on the resulting file which can eat your CPU for about 20 seconds/100mb of file (based on my observations).

-- 
Zed A. Shaw, MUDCRAP-CE Master Black Belt Sifu
http://www.zedshaw.com/
http://www.awprofessional.com/title/0321483502 -- The Mongrel Book
http://mongrel.rubyforge.org/
http://www.lingr.com/room/3yXhqKbfPy8 -- Come get help.


More information about the Mongrel-users mailing list