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) »
  • Membership by relationship info "stale" - Any way to force refresh?
Pages: [1]

Author Topic: Membership by relationship info "stale" - Any way to force refresh?  (Read 1152 times)

DerekL

  • I post frequently
  • ***
  • Posts: 132
  • Karma: 1
  • CiviCRM version: 4.5.5
  • CMS version: Drupal 7.34
  • MySQL version: 5.1.54
  • PHP version: 5.2.17
Membership by relationship info "stale" - Any way to force refresh?
May 29, 2012, 02:33:39 pm
I recently completed a 18K contact migration into CiviCRM and I am experiencing a strange issue whereby contacts that are set to take their membership status from their employer are not fully "up to date".

In other words, an employee of a current member is showing as "expired", and only showing last years membership, for example.

Is there any way to set off a batch update of member "by relationship" status?

Unfortunately, we went live before users caught this, so I can't roll back and reimport...

I found something interesting in "scheduled jobs", the "Membership status processor" job, and I ran it, but the job completed in 5 seconds, giving me this in the job log:
-------------------
Summary
Finished execution of Membership status processor with result: Success (Processed 17300 membership records. Updated 0 records. Sent 0 renewal reminders.)
Details

Parameters raw (from db settings):
version=3


Parameters parsed (and passed to API method):
a:1:{s:7:"version";s:1:"3";}

Full message:
Finished execution of Membership status processor with result: Success (Processed 17300 membership records. Updated 0 records. Sent 0 renewal reminders.)

--------------

Update: Even though the script supposedly ran in 5 seconds, my 2GB dedicated server went off and ran wild soon after, fatal errors (out of memory) everywhere! The thing is still so locked up I can't even FTP to it, but it looks like its over the hump. Ouch.

Update 2: Nope, I was wrong, not over the hump...Right back up to 500% util... Now HTTP and SSH sessions are being rejected...

Any help would be much appreciated!

Thanks!
« Last Edit: May 29, 2012, 03:03:07 pm by DerekL »

DerekL

  • I post frequently
  • ***
  • Posts: 132
  • Karma: 1
  • CiviCRM version: 4.5.5
  • CMS version: Drupal 7.34
  • MySQL version: 5.1.54
  • PHP version: 5.2.17
Re: Membership by relationship info "stale" - Any way to force refresh?
May 29, 2012, 04:11:35 pm
I had to restart the server, and to my dismay, none of the employee memberships I was keeping an eye on got updated in the 45 or so minutes of pure churn.

Apache, Drupal, CiviCRM logs all clean, not a trace of anything to do with memberships or scheduled jobs.

In a last ditch attempt before the long commute home I attempted:

wget 'http://<drupal_root>/sites/all/modules/civicrm/bin/UpdateMembershipRecord.php?
name=<username>&pass=<pw>&key=<sitekey>'

and all I got was:

 Updating

 Membership records updated. (Done)
<div class="dev-query"> Page execution time was 4112.99 ms.</div>

With no go on the membership refresh.

DerekL

  • I post frequently
  • ***
  • Posts: 132
  • Karma: 1
  • CiviCRM version: 4.5.5
  • CMS version: Drupal 7.34
  • MySQL version: 5.1.54
  • PHP version: 5.2.17
Re: Membership by relationship info "stale" - Any way to force refresh?
May 29, 2012, 05:09:44 pm
Ugh.

I wrote a quickie "Relationship Touch" module that uses the batch+civicrm API to update each and every relationship in the civicrm_relationship table (10,932 of them). This refreshed all the stale records without any kind of server killing side effects.

So much for the scheduled job.



tso2085

  • I post occasionally
  • **
  • Posts: 75
  • Karma: 0
  • CiviCRM version: 4.7.15
  • CMS version: Joomla 3.6.5
  • MySQL version: 5.5.37
  • PHP version: 5.5.30
Re: Membership by relationship info "stale" - Any way to force refresh?
October 22, 2012, 06:11:44 pm
Hello Derek,

Would you mind sharing your relationship touch module?

Thanks, Craig

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviMember (Moderator: Deepak Srivastava) »
  • Membership by relationship info "stale" - Any way to force refresh?

This forum was archived on 2017-11-26.