Duplicate messages using Notifications with Mercury

Events happening in the community are now at Drupal community events on www.drupal.org.
kestonh's picture

We’re running into an issue sending duplicate notifications to our users using the Notifications module on our Mercury Pressflow implementation. The duplicate messages are identical save one thing- the [node-url] token is being replaced with ‘default’ in one of the messages. All the other tokens in the message are being replaced correctly.
The duplicate emails do not happen consistently, maybe 10-15% of the notifications sent out, however a duplicate message always has the proper url & the ‘default’ url.

The only major modification we’ve made to Mercury was spinning off MySQL to it’s own server and adding replication. We currently have the reads set up to round robin between the 2 MySQL instances.

I have done the following troubleshooting based on finding similar issues
made sure the cron job is calling the correct url
replaced all configurations named ‘default’ with the site name (Memcached, Varnish, and Apache configs)
disabled caching in an init_hook in the notifications module

Has anyone out there experienced anything similar with Notifications and Mercury? Any and all advice is greatly appreciated.

Comments

drush cron?

justintime's picture

I have had the 'default' URL when I use 'drush cron' to run cronjobs. It's there because with drush there's no request headers sent so Drupal can't figure out the URL to use. Is it possible that you're running two crons at once - one with drush and one with curl/wget?

Doesn't seem to be cron

kestonh's picture

justintime- we aren't using drush for cron jobs, but great lead with the multiple cron idea. The issues don't appear to be related to cron at all, though I'm not sure what it is yet.

As an update to my original question, I was able to eliminate the duping by only reading from one of the databases. I think that the notifications process was running faster than the replication. I'm still getting 'default' as the node-url token, but I think it may be related to the notifications background process.

Mercury

Group organizers

Group categories

Post Type

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: