[imp] large attatchements
Eric Rostetter
eric.rostetter at physics.utexas.edu
Fri Nov 7 10:00:55 PST 2003
Quoting Tomáš Macek <maca02 at atlas.cz>:
> Yes, that's fine. But I have the 8 MB memory limit, and when I sent the mail
> with various attachment of total over 4 MB, apache died.
Yes, set it to about 2.5 times the attachment size, at a minimum. So for
4 MB attachments, set it to at least 10MB.
> That's the reason,
> why I programmed the restriction for each attachment and the total of
> attachment (yes, the total is already in the IMP implemented). I think, that
> 8 MB memory limit should be fine... Why it was not enaught?
* PHP takes memory itself, just to load/run. How much depends on the build.
* The (Horde/IMP) php scripts running take memory to load/run.
* The file upload is stored in memory.
* The file is base64 encoded which can easily at least double the size.
* While base64 encoding the file, it may store both the original and encoded
text in memory.
For these any other reasons, you need to set the memory limit to at least 2.5
times the file size, and more reasonably to 3 times to be safe.
Unlike others, I don't recommend not using memory limits. I like to limit it,
but I limit it to a very high value (say 64MB). This stops malicious/stupid
users from exhausting system resources, and helps if their is a bug to keep
it under control, etc.
> Maca
--
Eric Rostetter
The Department of Physics
The University of Texas at Austin
Why get even? Get odd!
More information about the imp
mailing list