Details
-
Type:
Improvement
-
Status:
Closed
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: 1.8, 1.8.1, 1.8.2, 1.8.3, 1.8.4, 1.8.5, 1.9, 1.9.1
-
Component/s: Other
-
Labels:None
-
Database:Any
-
Affected Branches:MOODLE_18_STABLE, MOODLE_19_STABLE
-
Fixed Branches:MOODLE_18_STABLE, MOODLE_19_STABLE
Description
Now, when a database connection fails, email can be sent to a specified address. The problem is at times, up to 100 email messages are sent on one failure.
Latest incident was one message sent every two seconds.
This can clog cell phone email accounts with unnecessary messages and cause admins to specify email message to less priority accounts, defeating its purpose.
Improvement would be to send one or two email messages in a specified interval, (5 minutes or so).
I agree this needs fixing, Bill.
Low priority thing for you Dongsheng, but when you need a break from repository stuff.
Look in lib/setup.php for 'emailconnectionerrorsto'.
We can't use the database to store times, obviously, so we need to "touch" a file in dataroot whenever we send an email, and before sending any email, check for the existence of that file and make sure it's at least 600 seconds old before continuing to send.