Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.2.7

Bug #794 Out of memory
Submitted: 2004-02-19 07:17 UTC
From: thoa0025 at mail dot usyd dot edu dot au Assigned: quipo
Status: Closed Package: Mail_Queue
PHP Version: 4.3.3 OS: linux
Roadmaps: (Not assigned)    
Subscription  
Comments Add Comment Add patch


Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem : 35 + 44 = ?

 
 [2004-02-19 07:17 UTC] thoa0025 at mail dot usyd dot edu dot au
Description: ------------ Mail_Queue runs out of memory when i send HTML based emails as it stores the headers and bodies which are large strings in memory. This occurs depending on the email but usually when i send 25-50 emails which are all HTML based. My php installation allows only 24mb of memory in it's execution and the array holding all the Mail_Queue_Body gets larger than it can be. To fix this I modified the system NOT to store the header and body strings in memory, and retreive and return them from the database, when the getHeaders() or getBody() method is called (which in my application is only once in it's lifetime).

Comments

 [2004-02-21 11:06 UTC] thomas-pear at mysnip dot de
So you retrieve each message alone on sending it? are these html messages that large? maybe its usefull to have a switch for that behaviour.
 [2004-02-21 13:06 UTC] chief at php dot net
It should be possibility to fetch() each mail separately instead of reading all to the queue at once. Thanx for the info I will try do this without breaking BC.
 [2004-02-29 14:48 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!
 [2004-02-29 23:43 UTC] thoa0025 at mail dot usyd dot edu dot au
No, only the meta information for the mail_queue record is retreived (everything which is currently retreived minus the body and the headers). When the header or the body is needed it is retreived out of the database. My hack, has really coupled the database into the object which is probably what you do not want. The emails are not huge. A html email template is used with about 500 characters of text. So storing 25-50 emails in memory kills the application.
 [2004-03-01 08:53 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!