Jim Donovan wrote:
> Hi,
>
> We run a webmail system which was written in Mason. It won't let you download or read large attachments (~5MB upwards). This seems to be some sort of memory allocation error.
>
> If you watch the server with top(1) while downloading a 2MB attachment, you can see the memory usage climb quickly to 45MB. With larger attachments, growth is ppresumably even faster and some limit is passed, crashing httpd.
>
> Does anyone know what is happening and how to control it, please?
>

This is happening when you're serving a file that's encoded into an
email down to a logged in webmail user? That just sounds like bad code
to me or something. mod_perl doesn't do anything on it's own that would
justify that kind of memory usage just serving a file. I could see how
it'd be easy to chew up RAM if you're reading a MIME encoded attachment
into a scalar, then converting it to binary, then serving it back to the
client though.

Adam