I'm sure this is just some sort of misunderstanding on my part, or a configuration error. I have been working on a project, and since it was only very slightly along in development I decided that since there was so much nice stuff in 2.60, I was going to start working with the rc1 release. I've started from scratch with 2.60-rc1, and have to say that I like a lot of things about it, but it's doing something that totally bewilders me. I'm also not really clear on the relationship of the notifications module and the messages module in Openatrium.

In any case, the issue here is that as log as I have messages turned on, the site keeps sending me email - the emails are what I'd expect to be getting, but they're sent in a continuous stream, over and over again until I disable the messages module. I'd appreciate some help on what might be going on here.

I'm not at all sure if this is related, but I'm also receiving a stream of notify log errors along the lines of:

Notice: Undefined property: Message::$user in oa_messages_mail_alter() (line 581 of /home/wiscommunity/public_html/profiles/openatrium/modules/contrib/oa_core/modules/oa_messages/oa_messages.module).
Notice: Undefined index: und in oa_messages_mail_alter() (line 586 of /home/wiscommunity/public_html/profiles/openatrium/modules/contrib/oa_core/modules/oa_messages/oa_messages.module).

Is the use of the notifications module necessary any more, or just the messages module?

Comments

Steve Hanson created an issue. See original summary.

mpotter’s picture

Messages are the base entity type created whenever something happens in Atrium, such as creating new content or editing content or adding a comment to content. The Recent Activity view shows a list of these Messages.

The Message_notify module is used to create email (or other types of) notifications for each message. The oa_notifications module provides the functions for storing a notification list with a node and generating the notification list used by message_notify.

The Mailhandler and oa_mailhandler modules are used to monitor an incoming IMAP mail box to look for replies to notification emails to post them back into Atrium as a comment.

So perhaps you have some sort of loop set up where the mailbox being monitored by Mailhandler is also getting the original notifications so that it keeps replying to them, then posting the reply comments, which generates another notification.

I do not see the behavior you mentioned on any of our Atrium sites here and Atrium does have some code in it that should prevent notifications from being sent to the Mailhandler address, so I'm not sure what would cause that.

But something else is wrong on your site. That error message about the undefined $user property means that your message entities do not have a user property. But this property is added to a message entity when it is first created in the message_create() function of the message module. So it sounds like you are doing something custom on your site because every message created in Atrium uses the message_create() function so there would not be any way to get that error message.

Steve Hanson’s picture

Actually I think I've found the cause of the problem, which seems to be caused by the default setup of Ultimate Cron - since it's just basically a sandbox on this site, I hadn't tinkered with any of that yet. It LOOKS like what has been happening is that since the message queue is run every minute, and it's a relatively slow server, and it was set up with Poorman's cron, every time there was an access to the site it was trying to run the queue, but it never completed until after the next cron run - which seemed to be setting up continual attempts to deliver. Once I started running cron with an explicit cron job the problem seems to have gone away.

Thank you very much for the explicit explanations of the process though - and I"m going to go through and try to figure out what the issue is with user.

Oh - one more thing - I currently don't have Mailhandler turned on so that's clearly not the cause of the problem.

mpotter’s picture

Status: Active » Fixed

Glad you found the issue. PoormansCron is something you should normally disable in any case since it kills the performance of your site. But good to know about the interaction with messages.

Steve Hanson’s picture

Hmm -- spoke too soon .

It's started back up again. I'm really at this point not at all sure what is going on, but every time I start cron running I start getting huge numbers of identical email notifications. I didn't seem to have that problem in older versions of Openatrium.

Steve Hanson’s picture

Status: Fixed » Active
Steve Hanson’s picture

Finally out of desperation I decided to see if I could replicate this behavior by building another Open Atrium site on the same server. This one works just fine (at least in this regard) so I can only assume that somewhere along the line while building this up, I did something really egregious to it, and I cannot replicate the problem on a clean install. So -- feel free to close this.

mpotter’s picture

Status: Active » Closed (cannot reproduce)
Steve Hanson’s picture

Okay, at least I now know what causes this behavior. It started up again on my new site build as soon as I went into the Message Subscribe Settings configuration page and checked the "Use Queue" box on the form. It suddenly took a perfectly reasonable notification (for a new team being created) and sent it to me 80-90 times every minute when the queue ran, which has made for some interesting email system performance issues.

I'm now experimenting with the possibility of making it stop after unchecking the box - there's so much email in the queue at this point that it's a little hard to tell what is actually happening. More later

Steve Hanson’s picture

Status: Closed (cannot reproduce) » Active
mpotter’s picture

You probably need to take this discussion over to the message_subscribe or message_notify issue queues since that option is coming from those modules and not added by Open Atrium.

Steve Hanson’s picture

Yup -- that's sensible.

mpotter’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

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