Forums | Mahara Community

Support /
Duplicate forum emails


anonymous profile picture
Account deleted
Posts: 21

12 April 2011, 3:15

We have recently encountered a problem where forum posts sometimes generate multiple email notifications. Unfortunately it's inconsistent, somebody can post in a forum and it'll get sent out 8 times, then later the same person posts in the same forum and it only gets sent once. I'm at a loss, I have no idea what's causing it or where to look, can anybody shed some light?

Server:
Mahara 1.3.3
RHEL 5.6
MySQL 5.0
Sendmail 8.13

François Marier's profile picture
Posts: 411

12 April 2011, 17:36

Hi Gary,

You could be running into similar problems than what we had with mahara.org when the list of users subscribed to a forum was so large that it caused errors in the cron run.

I'd suggest doing two things:

1- upgrade to 1.3.5 (nobody should be running 1.3.3 in production anyways since it has security vulnerabilities) since it may have relevant fixes

2- increase the amount of memory given to PHP (set "memory_limit" in your php.ini to a very large value)

Cheers,

Francois

anonymous profile picture
Account deleted
Posts: 21

13 April 2011, 8:18

I've narrowed it down a bit now, sometimes it's generating multiple notifications which are then emailed out to users who aren't logged on. If you are logged on you see duplicate entries in "Topics I'm Following".

I don't think it's down to the number of subscribed users, it's happening in a test forum with only 2 users. It's also intermittent, it doesn't always happen in the same forum or to the same users.

We're going to try upgrading and see if that helps, this wasn't mentioned in the upgrade notes though.

anonymous profile picture
Account deleted
Posts: 21

20 April 2011, 10:37

I've upgraded to 1.3.5, and upped the PHP memory limit to 512M, neither have made any difference. What do you mean by "very large value"? The web server only has 8GB, so I don't want to cause other problems by pushing it too high.
We've temporarily disabled email to stop people being bombarded, but they're still getting multiple notifications within Mahara, the most I've seen for one post is 9.

This only started happening a few weeks ago, things had been running smoothly for months. My only guess is that it's somehow linked to the continually increasing number of users (currently 16025), but as it's inconsistent I'm having real trouble narrowing it down.

François Marier's profile picture
Posts: 411

20 April 2011, 18:33

512MB should be high enough. I think you're running into a different problem.

One thing you can do while you're debugging these problems is set this in your config.php:

  $cfg->sendemail = true;
  $cfg->sendallemailto = '[email protected]';

and that way you'll be redirecting emails to a mailbox you can inspect.

The next thing I'd do is try to run the cron again but to capture the output of it to see if it throws any errors or warnings.

Make sure you enabling logging of errors on your site of course:

  $cfg->log_dbg_targets = LOG_TARGET_ERRORLOG;
  $cfg->log_info_targets = LOG_TARGET_ERRORLOG;
  $cfg->log_warn_targets = LOG_TARGET_ERRORLOG;
  $cfg->log_environ_targets = LOG_TARGET_ERRORLOG;

Cheers,

Francois

anonymous profile picture
Account deleted
Posts: 21

27 April 2011, 9:41

Just to make it more difficult to track down it's not happening at all this week, even in the forums that were miss-behaving last week. Possibly because of the holiday and the lack of users, which might be a clue. I'll have to wait and see what happens next week when the students come back.

The log for the cron job does keep throwing up an error: "A nonrecoverable error occured. This probably means you have encountered a bug in the system".
Not a very helpful message, but it only happens occasionally and doesn't seem to be related to the duplicate message issue.

6 results