Announcement abnormally sends duplicated email to students per 30 seconds for 20 minutes

Announcement abnormally sends duplicated email to students per 30 seconds for 20 minutes

Bởi Ariden Lei -
Số lượng các câu trả lời: 3

We upgraded Moodle from ver 3.6.1 to ver 3.8.9 three months ago. We are using CentOS 7.4.1708, PHP 7.2.16, MySQL 5.7.21, Moove theme

We have a course contains about 5600 participants. When the teacher posts announcement, the Moodle would send duplicated notification email to a portion of students about 150 students repetitive every 30 seconds. The duration is 20 minutes. That means one of the students receive 40 duplicated email. The remaining about 4000 students receive the email twice. It is very irritating. 

We found that this situation started happen about one and half month ago. At that time, we installed the plugin - Profile field based cohort membership. Would it be the cause of the problem? It seems working well for the process of student promotion. This plugin should be popular and we found it very useful.

At the same time, we also added the below statements to the httpd.conf

KeepAliveTimeout 3

Timeout 50

Hostnamelookups off

At my.conf, the below statement was added.

skip-name-resolve=1

We don't know if these changes are related to cause of problem or not.

Please advise how to resolve this problem. Thank you very much.

Trung bình điểm đánh giá: -
Để phản hồi tới Ariden Lei

Re: Announcement abnormally sends duplicated email to students per 30 seconds for 20 minutes

Bởi Ariden Lei -
I found that there is option - SMTP session limit at Outgoing mail configuration. We are using the default value is 1. Does it mean that Moodle only send one notification email each time? 5500 students means it need to send 5500 times?
If I change it to a higher value say, 100, would it help to solve this problem?

My current php.ini config:
memory_limit 256M

and also,
no extra PHP memory is set.

Would it cause problem for sending 5500 notification email parsed with 400kB images?

Please advise.
Để phản hồi tới Ariden Lei

Re: Announcement abnormally sends duplicated email to students per 30 seconds for 20 minutes

Bởi Ariden Lei -
Hi Francis,

The announcement sends duplicated email is due to the fact that the cron task fails to complete the Ad hoc task which is for sending email. Therefore, it repeats to do so. You may print the cron log to standard output for checking the error message.

To solve the problem, you may try the below setting:
1. Increase "Extra PHP memory limit" to 4096M
2. Increase "Ad hoc task concurrency limit" to 20
Trung bình điểm đánh giá:Useful (1)
Để phản hồi tới Ariden Lei

Re: Announcement abnormally sends duplicated email to students per 30 seconds for 20 minutes

Bởi Francis Feytout -

Hi, 

Did you find any lead on this problem ? I had the same duplication of messages with my anouncements at the start of this semester and I am quite puzzled.

My Moodle is 3.9.11 with smtpmaxbulk at 10, fr what it's worth.

Thanks