Re: Posting announcement trigger Moodle abnormally send duplicated email to students via SMTP server every 30 minutes for 20 minutes
Re: Posting announcement trigger Moodle abnormally send duplicated email to students via SMTP server every 30 minutes for 20 minutes
We added the below MPM directive before. ServerLimit 25
StartServers 3
MinSpareThreads 25
MaxSpareThreads 75
ThreadLimit 64
ThreadsPerChild 32
MaxRequestWorkers 800
MaxConnectionsPerChild 10000
Would the problem cause be StartServers too small?
Re: Posting announcement trigger Moodle abnormally send duplicated email to students via SMTP server every 30 minutes for 20 minutes
Execute adhoc task: mod_forum\task\send_user_notifications
... started 00:18:33. Current memory use 9.8MB.
Sending messages to 195197 (19869)
Error: lib/moodlelib.php email_to_user(): The following From address failed: null@smtp.XXXX.edu : Called MAIL FROM without being connected,,,SMTP server error: Called MAIL FROM without being connectedSMTP server error: Called MAIL FROM without being connected
++ Error calling message processor email ++
* line 502 of /lib/classes/message/manager.php: call to debugging()
* line 380 of /lib/classes/message/manager.php: call to core\message\manager::call_processors()
* line 348 of /lib/classes/message/manager.php: call to core\message\manager::send_message_to_processors()
* line 346 of /lib/messagelib.php: call to core\message\manager::send_message()
* line 369 of /mod/forum/classes/task/send_user_notifications.php: call to message_send()
* line 153 of /mod/forum/classes/task/send_user_notifications.php: call to mod_forum\task\send_user_notifications->send_post()
* line 286 of /lib/cronlib.php: call to mod_forum\task\send_user_notifications->execute()
* line 166 of /lib/cronlib.php: call to cron_run_inner_adhoc_task()
* line 76 of /lib/cronlib.php: call to cron_run_adhoc_tasks()
* line 61 of /admin/cli/cron.php: call to cron_run()
Post 40776 sent
What is the problem of the "From address"? What is the meaning of "Called MAIL FROM without being connected,,,SMTP server".
Why can't the sender email address connect to the SMTP server?
Please advise. Thanks a lot!
Re: Posting announcement trigger Moodle abnormally send duplicated email to students via SMTP server every 30 minutes for 20 minutes
Moodle isn't a mail server. Your site is configured to use an smtp relay. From what you've shared sounds like moodle is trying, but the smtp server isn't responding.
From your moodle server and command line, see if you can ping the smtp server. That shows the NIC is up. Also, if you had nmap installed on your moodle server, one could see if the smtp service port is available ... let's say port is 765 ... nmap command would be:
nmap -P0 -p 765 smtp.xxx.edu
If that port is opened it will tell ya that.
In the SMTP setup, there is a user and password. Is that user still valid?
You could also install a plugin to test:
https://moodle.org/plugins/local_mailtest
Basically, you need to contact whomever admins the stmp server as your moodle appears to be trying to send, but ...
'SoS', Ken
Re: Posting announcement trigger Moodle abnormally send duplicated email to students via SMTP server every 30 minutes for 20 minutes
I found that the cron always prompts "Skipping processing of adhoc tasks. Concurrency limit reached". The adhoc task is for sending forum notification email. Therefore, I increase the "Adhoc task concurrency limit" from 3 to 10. If this value is set large, I found that the CPU and memory would be easily overloaded.
[Solved]: Posting announcement trigger Moodle abnormally send duplicated email to students via SMTP server every 30 minutes for 20 minutes
1. unenrol the metalink of "Staff and students" and re-enrol the metalink. About 1000 suspended accounts are removed
2. Increase the Extra PHP memory limit from 1024M to 4096M
(Reason: It is noticed that duplicated email would be sent if this value is set to lower than 3072M)
PHP Fatal error: Allowed memory size of 2147483648 bytes exhausted (tried to allocate 10485792 bytes)
3. Increase the Ad hoc concurrency limit from 3 (default) to 20
(Reason: because no email is sent out sometimes. ) Would this value abnormally increase the Moodle memory consumption?
I refer to the post https://moodle.org/mod/forum/discuss.php?d=388490
4. use a valid email account with rule to drop incoming email for No-reply email address
(Reason: The cron task shows the error message: "The following From address failed: null@yyyy.xxxx.edu: MAIL FROM command failed,,, SMTP server error: MAIL FROM failedSMTP server error: MAIL FROM command failed")
Athough no duplicated email are sent, it is strange that the memory consumption of Moodle seems to be increased from 67GB to 100GB. Is it normal?