Hi. I'm heavily reliant on using Zend_Mail with Zend_Mail_Storage_Imap to
read and process large volumes of e-mail. I have a need to extract
attachments and write them to disk. The problem I'm frequently seeing is
this kind of error:

Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to
allocate 19986451 bytes) in
/ZendFramework-1.11.9/library/Zend/Mime/Decode.php on line 131

This is for a particular mail that has a single 14MB attachment.
Increasing the default PHP memory settings of 128MB to 256MB solves the
problem. But, given that I am likely to need to process attachments many
times bigger (say up to 50MB or more) blindly increasing the memory is not
the way to go. Also, this application will be deployed into AWS where RAM
is a premium commodity.

Googling around hasn't really helped. I think the issue is with the
inefficient way that ZF decodes mail parts but I don't really know where
to start on patching ZF. Has anyone encountered similar issues, and if so
how did you resolve them? I would be really grateful for any input, or
even better some code patches :-) Thanks in advance.

Regards,

Narinder.
-- 



-- 
List: [email protected]
Info: http://framework.zend.com/archives
Unsubscribe: [email protected]


Reply via email to