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 CiviMember (Moderator: Deepak Srivastava) »
  • adding a dual membership, php error occurs and hundreds of dupes created
Pages: [1]

Author Topic: adding a dual membership, php error occurs and hundreds of dupes created  (Read 2561 times)

narayanis

  • I post occasionally
  • **
  • Posts: 56
  • Karma: 2
adding a dual membership, php error occurs and hundreds of dupes created
November 30, 2008, 04:20:29 pm
I am starting to enter memberships into CiviCRM and have encountered a major issue three times today. When attempting to add a new membership to an individual record and clicking Save, I receive the following error:

Fatal error: Out of memory (allocated 41418752) (tried to allocate 80 bytes) in /home/myparkci/public_html/drupal/sites/all/modules/civicrm/packages/PEAR.php on line 872

When I click back, I am on the membership data entry form with my form fields filled in. However, in the meantime the system just created over 100 instances of the membership I attempted to create.  And since it is a dual membership, it has actually written about 260 records. Here is some more detail:

membership type is called 'Couple'
contribution type is Member Dues
13-month fixed period
relationship type is 'Partner of' -- this is a new type I created and applies to individual records only
CiviCRM 2.1.2
PHP 5
MySQL 5.0.67

I have received the error twice on the same record, so deleted both related individuals and recreated them from scratch to ensure there's no corruption with the record. I have not yet recreated the household record, but that seems irrelevant to the issue. I have not had the problem so far when adding the membership to a record with no household nor relationships. In the meantime, I have wiped the bad data directly from the db using the phpAdmin tool.

Does anyone have some thoughts on why this may be occurring or how to prevent it?
Thanks,

Nicholai
« Last Edit: November 30, 2008, 05:11:31 pm by narayanis »

narayanis

  • I post occasionally
  • **
  • Posts: 56
  • Karma: 2
Re: adding a dual membership, php error occurs and hundreds of dupes created
November 30, 2008, 05:10:52 pm
Here is some additional information from further troubleshooting.  The issue is:
-not related to households, as I have removed that from the records
-not related to custom relationship types, as I can reproduce the error when using 'Spouse of' in my membership setup
-not related to inactive relationships, as I can disable the relationship before adding the membership and no errors occur. The issue does come up when reactivating the relationship after adding the membership, and the hundreds of dupes are created
-not related to email confirmation settings (turned off all outgoing email)
-not related to payment information, as I can reproduce it whether or not this is entered on the membership

The problem is somehow tied to using relationship types in the membership type setup, but I'm a SQL guy and not proficient enough in PHP to know what's happening beyond that. I did receive a single message once referring to something along the lines of relationships/BAO but haven't reproduced that part of it again.

The entire system is plain vanilla, save for deleting the canned relationship type 'Sibling of'. Any advice would be hugely appreciated. Thanks again.

Kurund Jalmi

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4169
  • Karma: 128
    • CiviCRM
  • CiviCRM version: 4.x, future
  • CMS version: Drupal 7, Joomla 3.x
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: adding a dual membership, php error occurs and hundreds of dupes created
November 30, 2008, 09:33:13 pm
Looks like memory issues, you need to increase php memory limit. Do search forum for  "memory_limit".

HTh

Kurund
Found this reply helpful? Support CiviCRM

narayanis

  • I post occasionally
  • **
  • Posts: 56
  • Karma: 2
Re: adding a dual membership, php error occurs and hundreds of dupes created
December 01, 2008, 04:31:57 am
It seems like it is some kind of infinite loop that keeps churning out records until it runs out of memory, though. Wouldn't increasing the memory just give it time to create more duplicates before crashing?  The error messages below say that it is already using 40 megs of memory, which seems like a lot for a simple insert that only hits three or four tables, and it doesn't do this when there is no relationship on the contact record.

I have checked the error logs at Bluehost and retrieved the relationship error:
[30-Nov-2008 16:21:55] PHP Fatal error: Out of memory (allocated 42205184) (tried to allocate 5613 bytes) in /home/myparkci/public_html/drupal/sites/all/modules/civicrm/CRM/Contact/BAO/Relationship.php on line 729
[30-Nov-2008 16:55:33] PHP Fatal error: Out of memory (allocated 41418752) (tried to allocate 80 bytes) in /home/myparkci/public_html/drupal/sites/all/modules/civicrm/packages/PEAR.php on line 872
[30-Nov-2008 17:45:39] PHP Fatal error: Out of memory (allocated 41418752) (tried to allocate 538 bytes) in /home/myparkci/public_html/drupal/sites/all/modules/civicrm/CRM/Contact/BAO/Relationship.php on line 666

If you still think it is a memory issue however, please confirm and I will try to edit php.ini to increase the memory allocation (within the limits of Bluehost). Thanks.

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: adding a dual membership, php error occurs and hundreds of dupes created
December 01, 2008, 06:41:58 am

i agree it seems to be an infinite loop issue.

any chance we can get ssh access to the box, so we can debug (most likely this is a data dependent bug). if so, can you ping us on IRC:

http://embed.mibbit.com/?server=irc.freenode.net&channel=%23civicrm&forcePrompt=true

i'll be online from 8:15 am PST or so later today

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

hirbys

  • I’m new here
  • *
  • Posts: 12
  • Karma: 0
    • ESTHER
Re: adding a dual membership, php error occurs and hundreds of dupes created
March 05, 2009, 07:16:18 am
I'm having this same behavior today using 2.1.4. Membership type includes automatic creation of a membership for a spouse. I'm trying to create memberships for past years (to catch up!). Has the problem been diagnosed, and is a patch available?ß

petednz

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4899
  • Karma: 193
    • Fuzion
  • CiviCRM version: 3.x - 4.x
  • CMS version: Drupal 6 and 7
Re: adding a dual membership, php error occurs and hundreds of dupes created
March 05, 2009, 09:25:47 am
Is it possible that people at both ends of the 'relationship' are being given the Membership during the import

ie pete is married to mary (don't tell jenny pls)

pete is imported with membership = family (so mary gets it by dint of being in relevant relationship)

then in same import Mary is also imported with above. And the system blows a fuse?
Sign up to StackExchange and get free expert advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

pete davis : www.fuzion.co.nz : connect + campaign + communicate

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: adding a dual membership, php error occurs and hundreds of dupes created
March 06, 2009, 01:59:01 pm
For others following this topic - a bug report has been filed:

http://issues.civicrm.org/jira/browse/CRM-4213
Protect your investment in CiviCRM by  becoming a Member!

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviMember (Moderator: Deepak Srivastava) »
  • adding a dual membership, php error occurs and hundreds of dupes created

This forum was archived on 2017-11-26.