Answers.Body: <p>If you are processing more records at the same time - you will run out of memory - </p>
  
  <p>In order to prevent Out of Memory the best way is to process less records in a single go - civimail does process records in a batch (like 200 approx.) at a single go </p>
  
  <p>Whenever we create PDF in bulk, mail in bulk always we use to end up in Out of memory even in local PC or local server - so processing min amount of records should fix the problem </p>
  
  <p>I guess the main problem for this Out of memory Issue is:
  Civicrm DAO uses more memory and once the process is finished it doesn't free the memory at all. So php memory keeps on building and eventually - so we end up in Out of memory </p>
  
  <p>I guess this helps!!!!</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-10-14T14:09:05.217Z
Answers.LastActivityDate: 2016-10-14T14:09:05.217Z
Answers.UserDisplayName: Ramesh - ARTECH Consultancy
Body: <p>It appears that Scheduled Jobs for sendmail is throwing memory errors. After it was observed that mail was not sending, I attempted to "Execute Now" from the admin area.</p>
  
  <p>Fatal error: Out of memory (allocated 120848384) (tried to allocate 21703932 bytes) in /home/[site]/www/www/sites/all/modules/civicrm/packages/Mail/mimePart.php on line 313</p>
  
  <p>My host increased my memory, "We just increased your account's memory limit from 195 MB to 295 MB. We applied the changes in your global php.ini settings as well."</p>
  
  <p>Now the error reads:</p>
  
  <p>Fatal error: Out of memory (allocated 203685888) (tried to allocate 29831950 bytes) in /home/[site]/www/www/sites/all/modules/civicrm/packages/Mail/mime.php on line 1030</p>
  
  <p>Any suggestions?</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-10-14T07:50:36.797Z
Comments.Text: Have you tried changing the 'System Settings" > 'Outbound Email' from Sendmail to mail()?
Comments.UserDisplayName: Graham
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-10-14T11:33:04.740Z
Comments.Text: I made that change. After clearing the cache in Civi and Drupal, I still get the following:  Fatal error: Out of memory (allocated 203948032) (tried to allocate 29831950 bytes) in /home/[site]/www/www/sites/all/modules/civicrm/packages/Mail/mime.php on line 1030
Comments.UserDisplayName: S Christopher
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-10-14T12:29:05.130Z
Comments.Text: My host increased the memory to 350. Apparently that helped, but then it had a CPU timeout. They increased (temporarily) to 100 seconds for it to finally process. They said that's a temp fix they have to change back. With less than 200 recipients, why would it be using so much memory and timing out after so long?
Comments.UserDisplayName: S Christopher
Tags: <civimail><drupal><4.7.10>
Title: Fatal error: Out of memory - CiviMail
ThreadText: # Fatal error: Out of memory - CiviMail
  
  (Asked by: username_0 on 2016-10-14)
  
  It appears that Scheduled Jobs for sendmail is throwing memory errors. After it was observed that mail was not sending, I attempted to "Execute Now" from the admin area.
  
  Fatal error: Out of memory (allocated 120848384) (tried to allocate 21703932 bytes) in /home/[site]/www/www/sites/all/modules/civicrm/packages/Mail/mimePart.php on line 313
  
  My host increased my memory, "We just increased your account's memory limit from 195 MB to 295 MB. We applied the changes in your global php.ini settings as well."
  
  Now the error reads:
  
  Fatal error: Out of memory (allocated 203685888) (tried to allocate 29831950 bytes) in /home/[site]/www/www/sites/all/modules/civicrm/packages/Mail/mime.php on line 1030
  
  Any suggestions?
  
  **Tags:** civimail, drupal, 4.7.10
  
  > **Comments:**
  > **username_1**: Have you tried changing the 'System Settings" > 'Outbound Email' from Sendmail to mail()?  
  > **username_0**: I made that change. After clearing the cache in Civi and Drupal, I still get the following:  Fatal error: Out of memory (allocated 203948032) (tried to allocate 29831950 bytes) in /home/[site]/www/www/sites/all/modules/civicrm/packages/Mail/mime.php on line 1030  
  > **username_0**: My host increased the memory to 350. Apparently that helped, but then it had a CPU timeout. They increased (temporarily) to 100 seconds for it to finally process. They said that's a temp fix they have to change back. With less than 200 recipients, why would it be using so much memory and timing out after so long?  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2016-10-14. Score: 1
  
  If you are processing more records at the same time - you will run out of memory -
  
  In order to prevent Out of Memory the best way is to process less records in a single go - civimail does process records in a batch (like 200 approx.) at a single go
  
  Whenever we create PDF in bulk, mail in bulk always we use to end up in Out of memory even in local PC or local server - so processing min amount of records should fix the problem
  
  I guess the main problem for this Out of memory Issue is:
  Civicrm DAO uses more memory and once the process is finished it doesn't free the memory at all. So php memory keeps on building and eventually - so we end up in Out of memory
  
  I guess this helps!!!!
  
  
  ---
  
  