Hello, I'm fighting with a weird issue - some of our subscribers complain that they get duplicate emails, I've checked the logs and they are right. This has also happened with the Messaging and Notifications, at first only a few users were getting duplicates for some emails and in the end every user was getting every email twice. I assumed it was connected with those modules and replaced them with Subscriptions. Now the problem occurs again. I have two questions:

1) Has anyone got an idea where I should look? I'm really lost. I'm using Mandrill (mandrillapp.com) as SMTP server and used PHPMailer for connection in Drupal (just replaced it with SMTP, hope it helps). The website is hosted with Omega8.cc if that's important, their tech support can't help with this issue.

2) I've looked at the subscriptions_queue table and see the sqid column, which is the only one that seems to be related to nodes - how do I find which sqid links to which node? I hope to run a filter on the table to remove duplicate entries if they are there.

Thanks in advance

Comments

SolasArd’s picture

Issue summary: View changes
SolasArd’s picture

The problem turns out to be in cron, for some reason duplicate cron requests are being issued and, what is more important, executed, ignoring the semaphore, thus leading to duplicate emails. The hosting tech support suggest this is an issue with Drupal core, so I'll post the issue here: https://drupal.org/node/2259905

salvis’s picture

Title: Filtering out duplicates » Duplicate notifications with Poormanscron
Issue tags: -duplicate emails

Seeing that you didn't get any response in #2259905: Duplicate cron runs, here are my thoughts:

From your description in the other thread I gather that you're using Poormanscron which has a bad reputation. It's not intended for production use, and a hosting provider that does not give you real cron should not claim to have a setup "built specifically for Drupal".

Even if it worked correctly, sending out 40+ emails takes a certain time, and making any random user wait for this to complete during his page refresh will definitely not make your site shine...

It is normal to have duplicates in the subscriptions_queue table. These are eliminated at cron time when the notifications are sent. That's NOT the source of your symptoms. The issue is running cron.php in parallel.

You may be able to get some help from the Poormanscron issue queue, but the real solution is probably to move to a better hosting provider. If you cannot do that, then try to disable Poormanscron and subscribe to an external cron provider. Searching for "external cron provider" will give you a number of choices.

salvis’s picture

Status: Active » Closed (outdated)