CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviEvent (Moderator: Yashodha Chaku) »
  • Memory usage exceeded when sending email to multiple participants
Pages: [1]

Author Topic: Memory usage exceeded when sending email to multiple participants  (Read 2337 times)

ken

  • I live on this forum
  • *****
  • Posts: 916
  • Karma: 53
    • City Bible Forum
  • CiviCRM version: 4.6.3
  • CMS version: Drupal 7.36
  • MySQL version: 5.5.41
  • PHP version: 5.3.10
Memory usage exceeded when sending email to multiple participants
February 09, 2010, 03:34:21 pm
My PHP memory limit is set to 64M, and I am testing registration of multiple participants.

There are no problems when I don't enter email addresses for subsequent participants, but when I do, I run out of memory (backtrace included below).

1. Is the recommended memory limit still 64M? Perhaps that ought to be updated on the documentation.
2. The 1.9M of memory being allocated when it fails seems to be for the email message template for the subsequent participants. Can the memory for the first template be freed prior to allocating this?
3. Can I instrument my code to tell me how much memory processes are using? If such a failure occurred "in the wild" I would have disgruntled constituents, but perhaps no idea that this is a problem.

Thanks for a brilliant 3.1!

Ken

------------------- Backtrace -------------------

Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 1966080 bytes) in /var/www/citybibleforum/media/civicrm/templates_c/en_US/en_US/%%CD/CD8/CD872D7C%%html%3E%0A.php on line 4352
Call Stack
#   Time   Memory   Function   Location
1   0.0003   157896   {main}( )   ../index.php:0
2   0.1275   10355336   JSite->dispatch( )   ../index.php:68
3   0.1317   10737440   JComponentHelper->renderComponent( )   ../application.php:124
4   0.1332   10846848   require_once( '/var/www/citybibleforum/components/com_civicrm/civicrm.php' )   ../helper.php:162
5   0.1841   17222488   civicrm_invoke( )   ../civicrm.php:24
6   0.2170   20462856   CRM_Core_Invoke::invoke( )   ../civicrm.php:81
7   0.3589   28597512   CRM_Core_Controller->run( )   ../Invoke.php:209
8   0.3594   28612280   HTML_QuickForm_Page->handle( )   ../Controller.php:249
9   0.3594   28612616   HTML_QuickForm_Controller->handle( )   ../Page.php:103
10   0.3595   28612880   CRM_Core_QuickForm_Action_Next->perform( )   ../Controller.php:203
11   0.3595   28613344   CRM_Core_StateMachine->perform( )   ../Next.php:63
12   0.6211   51043592   CRM_Core_Form->mainProcess( )   ../StateMachine.php:166
13   0.6212   51043720   CRM_Event_Form_Registration_Confirm->postProcess( )   ../Form.php:249
14   2.2713   57504960   CRM_Event_BAO_Event::sendMail( )   ../Confirm.php:737
15   2.3065   57924112   CRM_Core_BAO_MessageTemplates::sendTemplate( )   ../Event.php:1038
16   2.6013   63927632   CRM_Core_Smarty->fetch( )   ../MessageTemplates.php:412
17   2.6014   63928376   Smarty->fetch( )   ../Smarty.php:159

DylanRao

  • I’m new here
  • *
  • Posts: 10
  • Karma: 0
Re: Memory usage exceeded when sending email to multiple participants
March 04, 2010, 07:46:00 am
Hi Ken,

Is this still an issue for you? I'm just starting an integration for an organization that's going to be having group registrations all the time so your post set- off an alarm. We're a little new to CiviCRM, this is our first project.
Thanks,

D.

ken

  • I live on this forum
  • *****
  • Posts: 916
  • Karma: 53
    • City Bible Forum
  • CiviCRM version: 4.6.3
  • CMS version: Drupal 7.36
  • MySQL version: 5.5.41
  • PHP version: 5.3.10
Re: Memory usage exceeded when sending email to multiple participants
March 04, 2010, 08:57:45 pm
I increased my PHP memory limit to 100Mb (if only I could do that between my ears ...).

All is good.

My concern is that unless this sort of error is logged, and that log is sighted, I might be blissfully unaware of this sort of fault. Note that CiviCRM does log its errors into files called <JOOMLA-ROOT>/media/civicrm/templates_c/en_US/ConfigAndLog/CiviCRM.*.log (not sure what the Drupal equivalent is), so you can monitor error logs.

Ken

Piotr Szotkowski

  • I live on this forum
  • *****
  • Posts: 1497
  • Karma: 57
Re: Memory usage exceeded when sending email to multiple participants
March 05, 2010, 09:04:30 am
I reproduced the leak and filed CRM-5920 to fix this.
If you found the above helpful, please consider helping us in return – you can even steer CiviCRM’s future and help us extend CiviCRM in ways useful to you.

ken

  • I live on this forum
  • *****
  • Posts: 916
  • Karma: 53
    • City Bible Forum
  • CiviCRM version: 4.6.3
  • CMS version: Drupal 7.36
  • MySQL version: 5.5.41
  • PHP version: 5.3.10
Re: Memory usage exceeded when sending email to multiple participants
March 06, 2010, 08:07:17 pm
Thanks, Piotr.

I know from previous experience how tricky memory leaks can be to track down. Thanks for your effort,

Ken

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviEvent (Moderator: Yashodha Chaku) »
  • Memory usage exceeded when sending email to multiple participants

This forum was archived on 2017-11-26.