As I say in subject, the problem is that some users receive multiple copies of email and others none.

After some notifications and log study, my conclusion of what happens is this one.
Notify starts with cron (set for once a day), sends for about 200 seconds (about 100 emails) and stops. I'm dealing with server for this problem, so don't worry about stoping reason it should be a resource limits.

Also, think there aren't unlimited resources so sometimes Notify is going to reach them. That's why I think is important to fix the problem to allow some "fault tolerance".

Notify seems to have 2 problems when sending process doesn't finish correctly:

  1. Restarted task, starts from recipient #1. Is it possible to jump over previous sended recipients?
  2. Now it restarts inmediately 7 to 9 times. Possible solution: It shouldn't restart until next cron or configure number of tries?

System configuration:

  • Drupal 7.22
  • Notify version 7.x-1.0-alpha1
  • Last version (7.x-1.0) of SMTP Authentication Support and Gmail SMTP server
  • About 200 recipients
  • Notification settings: send ... every [1 day], hour to send ...[5], number of failed sends ...[disabled]

I've been running Notify with only 3 users "notify enabled" for 2 months. Everything was OK until I enabled the rest of 200 users.

Related issues:

Update

I beleve this bug has been fixed in notify 7.x-1.0-alpha3.

Please review.

Comments

gisle’s picture

gisle’s picture

This is a bug that has been with Notify from the start. As far as I've able to tell. it has never been fixed correctly for any of the previous versions.

As a result, I've just spent the best part of the last three weeks rewriting major parts of Notify.

The new dev-version on the 7.x branch can be downloaded from the repository. It is Commit a27fa8e on 7.x-1.x (use git to clone, or click on the link to "snapshot" to download the tarball).

The major change in this version is that Notify is now able to deal with interruptions when sending out Notifications. When interrupted, it will not start from scratch, but continue from where it left off (so you will no longer spam your users with repeat messages).

Notify will now deal gracefully with cron timing out or other unscheduled interruptions. You can also schedule interruptions, by setting a maximum number of notifications to send in a single cron run. This will spread the sending out of notifications over several cron runs.

In addition to fixing (I hope!) this major bug, there is also a number of minor bug fixes in this release to deal correctly with race conditions such as new nodes being created while Notify is running, and nodes being created but published at a much later date.

Please review and report back here. If this version passes review, I'll upgrade it to release alpha2 ASAP (and I promise to deal with any bugs you find during the review process in a timely manner).

gisle’s picture

Version: 7.x-1.0-alpha1 » 7.x-1.x-dev
Assigned: Unassigned » gisle
Status: Active » Needs review
gisle’s picture

Issue summary: View changes
gisle’s picture

Issue summary: View changes
gisle’s picture

Version: 7.x-1.x-dev » 7.x-1.0-alpha3
Issue summary: View changes
josean’s picture

Great work gisle!
This alpha3 version solved completely the problem.
Tested in test server with 400 recipients and installed in production site with 200 recipients.

I change status to Fixed.

Many thanks.

josean’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.