I have a campaign scheduled in SuiteCRM 7.13.0 running on PHP 8.0. The emails got triggered to the recipients more than twice, and the status of the campaign for message attempts shows 34 hits. When I verified the campaign table and campaign email queue, it showed a single record for that email address. I can confirm there are no duplicate email addresses registered in the selected target list. I checked the outgoing email server connectivity; the server is active, and there are no restrictions configured to send out the campaigns.
Please help me to find out the root cause of this so that in the future it will be handled.
I’m not sure this is going to be much help but I believe I’ve encountered this issue or a similar one a few times in 7.13 and 7.14 as well. I always figured it was just something odd that we were doing since I never saw anyone mention it (and it’s very obvious if it happens). I don’t know what triggers it but it may have something to do with sending multiple campaign test emails and not clearing previous test emails. (I really don’t know!) But, if this is the same problem that you are seeing then you may be able to search your suitecrm log for “Duplicate” and you may find something about a Duplicate entry which appears to somehow cause the campaign engine to exit without removing the emails that have already been successfully sent. This effectively sends the same email over and over again to some recipients. It’s only happened to me a few times and I was able to correct the issue by removing the duplicate entry directly from the database . FYI, we’re currently on 7.15.1 and send monthly emails to thousands of our customers and have not encountered the issue for over a year now. In any case, I always send one final test email to myself just to be sure it’s removed from the queue and doesn’t get sent everytime the scheduler runs.
hi @maneesha
The duplicate campaign emails in SuiteCRM 7.13.0 on PHP 8.0 are most likely caused by concurrent scheduler executions, where multiple cron processes simultaneously pick up the same `campaign_email_queue` record. The recommended fixes are to apply a lock on the cron job to prevent overlapping executions, set `campaign_max_attempts = 1` in `config_override.php`, audit the campaign processing files for PHP 8.0 deprecation errors, and enable debug logging to capture the exact failure point during the next test campaign run.
I think you’re on to something with the concurrent processes theory! There have been times that I would be impatient and manually click the “Send Queued Campaign Emails” button to get things started. It’s very possible that the scheduler task could run at the same time or I could simply click the button again before it was finished. FYI, I stopped manually clicking it about a year ago when I changed the scheduler timer to every 5 minutes and have not had the issue since.