0

Something kills/freezes MySQL once per cron by executing:

INSERT INTO civicrm_tmp_e_dedupe_301d41956c9e2bd93bf184f95b40adef (id1, id2, weight) SELECT id1, id2, weight FROM (SELECT t1.contact_id id1, t2.contact_id id2, 20 weight FROM civicrm_email t1 INNER JOIN civicrm_email t2 ON ((t1.email IS NOT NULL AND t2.email IS NOT NULL AND t1.email = t2.email AND t1.email <> '' AND t2.email <> '')) WHERE t1.contact_id < t2.contact_id AND t1.contact_id IN (3,5,9,11,19,21,25,28,38....SOME 100K IDs here .....102486,102487,102488,102489,102490,102498,102499)) subunion GROUP BY id1, id2, weight ON DUPLICATE KEY UPDATE weight = weight + VALUES(weight)

There are only about 70K contacts in the database, nothing related in Scheduled Jobs, nor any custom Wordpress Plugin. CiviCRM Rules not installed nor any extensions which would look like possible interceptors. There is only one crontab entry:

/usr/local/bin/php /home/username/cv api job.execute --user=civicrm

It feels like some "duplicate finder" script has been launched from somewhere and forgotten.

There is something possible related: a few (not all, just 3 or 4 out of a dozen total) Wordpress admins, having CiviCRM administrator role, got thousands duplicated contact records in CiviCRM.

Ran out of ideas currently apart from the database search - wish I knew what to search for though.

Wordpress the latest, CiviCRM 5.76.2,

Sheduled jobs

1 Answer 1

0

Do you have the batch merge dedupe scheduled job enabled?

https://dmaster.demo.civicrm.org/civicrm/admin/job/edit?action=update&id=21&reset=1

11
  • Nope, the job is not even in the list of enabled jobs - neither in the jobs list at all .
    – yurg
    Commented Oct 2 at 15:46
  • That's strange. It's part of core and not new at all. Try Ctrl-F and search for process_batch_merge on the jobs page?
    – Demerit
    Commented Oct 2 at 16:02
  • Try cv api Job.process_batch_merge gid=foo. If it says gid is not a valid integer, then it means it recognizes the job exists, and something somewhere is probably calling it. You could grep the filesystem for process_batch_merge. If it says the job does not exist then that would be strange, but would mean something else is going on.
    – Demerit
    Commented Oct 2 at 17:14
  • Yes, it's definitely "something else": cv api Job.get output has missing jobs between id17 and id22, However I don't understand, if a job doesn't exist, how would it be executed.
    – yurg
    Commented Oct 2 at 18:52
  • There's a difference between a job action and an job instance - a little bit like civireport. Job.get returns the saved instances. But you can still run the action directly like the example call I gave.
    – Demerit
    Commented Oct 2 at 19:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.