[imp] Max attachment size

Paul van der Vlis paul at vandervlis.nl
Wed Mar 25 18:06:33 UTC 2009


Michael M Slusarz schreef:
> Quoting Paul van der Vlis <paul at vandervlis.nl>:
> 
>> memory_limit = 100M
> 
> [snip]
> 
>> But I still get this type of errors:
>> Fatal error: Allowed memory size of 104857600 bytes exhausted (tried to
>> allocate 48525721 bytes) in /usr/share/horde3/lib/Horde/MIME/Part.php on
>> line 1152
>>
>> What will be wrong?  48525721 is much less then 104857600...
> 
> Raise your memory limit.  PHP's internal string manipulation functions
> are notorious memory hogs.  Understand that processing an attachment may
> involve base64 encoding, VFS storage (one of the VFS storage backends -
> possibly mysql - is extremely memory inefficient, resulting in memory
> usage 3 or 4 times the size of the data to be stored), etc.
> 
> In all honesty, 100 megs is not all that much.  I can guarantee that any
> desktop mail application routinely uses this amount of memory,

I raised memory_limit to 800M and now it works fine. I lowered the
post_max_size and upload_max_filesize to 20M. It still works fine.
Thanks for your help!

I did forward the 10MB attachment and I was wondering that this takes
about 120 seconds. But my max_execution_time and max_input_time are both
'60'. Strange that it works. To be sure I raised the times to 200 seconds...

Another point I see is that the forwarded message has a size (in Horde)
of 24023 KB. The first message had a size of 14035 kB. Any idea what is
wrong?

When I download the forwarded attachement the file has a size of
10485612 bytes. The original was 10485760 bytes. The first attachement
(not forwarded in Horde) was still the correct size after downloading.
Any idea?

With regards,
Paul van der Vlis.




-- 
http://www.vandervlis.nl/



More information about the imp mailing list