Skip to content
This repository has been archived by the owner on Jul 20, 2022. It is now read-only.

civicrm_activity table filling up with Mandrill activities #26

Closed
m4olivei opened this issue Dec 31, 2013 · 5 comments
Closed

civicrm_activity table filling up with Mandrill activities #26

m4olivei opened this issue Dec 31, 2013 · 5 comments

Comments

@m4olivei
Copy link

Hello,

I got a notice from our webhost that our space was almost completely used up. On further investigation, it looks like the culprit is the civicrm_activity table, taking up over 2GB of disk space. Looking into the rows in there, the majority are activity_type_id 55, 56, and 57, which I figured out were: "Mandrill Email Sent", "Mandrill Email Open"
and "Mandrill Email Click" respectively. Looks like what is really adding up is the details column, which stores a copy of the entire email every time. Is there anyway to either avoid logging an activity for each of these events or avoid storing the details for these events?

Using:
Drupal 7.25
CiviCRM 4.3.5
Mandrill Transactional Emails v1.2

Thanks!
Matt

@JoeMurray
Copy link
Member

This is a feature request we would be happy to entertain if there was funding for it. I imagine we could have a 'Save Email Body with Actvities?' Yes/No field on the admin screen, maybe broken out by Activity type so it could be stored for sends but not opens or click-throughs. If there is no funding, you might just try removing line 194 from mte.php:
'details' => $params['html'],

i haven't tested this.

HTH

@m4olivei
Copy link
Author

m4olivei commented Jan 2, 2014

Sounds like a plan. Thanks for the help. I'll see if I can implement this for my client, if they are willing to fund, or if I just get inspired one boring night. In the meantime, I'll probably do what you suggest and comment out that line.

Thanks,
Matt

@m4olivei m4olivei closed this as completed Jan 2, 2014
@JoeMurray
Copy link
Member

Oh, just looking around, you also need to deal with the callback routine. Please comment out line 167 of CRM/mte/Page/callback.php:

              $activityParams['details'] = $mailBody;

To prevent creating activities you might want to explore putting in some early return statements on a few of these functions.

@m4olivei
Copy link
Author

m4olivei commented Jan 2, 2014

Cool beans, thanks Joe.

xurizaemon added a commit to fuzionnz/biz.jmaconsulting.mte that referenced this issue Sep 5, 2017
xurizaemon added a commit to fuzionnz/biz.jmaconsulting.mte that referenced this issue Sep 5, 2017
xurizaemon added a commit to fuzionnz/biz.jmaconsulting.mte that referenced this issue Sep 5, 2017
This inflates the Activity table and is not required for MTE extension to work.

Refs JMAConsulting#26, JMAConsulting#110.
@xurizaemon
Copy link
Contributor

Over in #110 there's some WIP to make this a configurable option ...

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants