[Mongrel] Mongrel and memory usage
wyhaines at gmail.com
Mon Nov 5 16:39:18 EST 2007
On 11/5/07, Matte Edens <matte at ruckuswireless.com> wrote:
> If you're using attachment_fu and send_file then mongrel is handling the
> sending of files. I had the same problem, spiking memory usage, until I
> switched to using x_send_file. It pushes the file downloads to apache,
> instead of mongrel. My memory usage has never spiked since...
This falls under the category of creating http responses. If you are
using send_file within Mongrel, then the response object that is
created will contain all of the file contents. If your file is small
to moderately sized, that's no big deal, but if you start pushing
large files around, it will have an impact on your RAM usage. Pushing
huge files via send_file necessarily implies huge RAM usage.
Don't do that. x_send_file is one way to avoid doing that.
More information about the Mongrel-users