Closed tsteur closed 4 months ago
A customer reported this same problem:
Multiple Alerts: We have noticed that we are receiving multiple alerts for the same event or condition within our Matomo account over Email alerting system. This duplication has caused confusion and disruption to our monitoring processes. Could you please advise on the possible causes of this issue and recommend a solution to rectify it?
@atom-box This should be fixed with new version of core I assume
I have a similar problem. An email is sent every 5 minutes. I have deleted all alerts and deactivated the plugin. The emails are still being sent. How can I stop this?
Matomo Version: 4.16.0 Custom Alerts: 4.1.1
Hi @cabul11 . I'm sorry to hear that you are experiencing this issue. Are you sure that the emails are being generated by the CustomAlerts plugin, as alerts can only be configured to be processed either daily, weekly, or monthly? If the plugin has been deactivated, the code shouldn't be loading anymore. If you have access to the config/config.ini.php
file on your server, you could make sure that CustomAlerts is no longer in the PluginsInstalled
list. If all else fails, you could try removing the CustomAlerts directory and its contents from your server.
I have the same problem. The same custom alert emails were sent twice inbetween 5 minutes. This happens not at every day, but very often.
The Matomo log file shows that the scheduler task for "Custom Alert" is executed twice. Note: The cron job for archiving runs every 5 minutes, but the first job had already finished.
Please note that there are days where the scheduler task is correctly executed only once.
INFO CoreAdminHome[2023-10-18 23:00:03 UTC] [a9475] --------------------------- INFO CoreAdminHome[2023-10-18 23:00:03 UTC] [a9475] INIT INFO CoreAdminHome[2023-10-18 23:00:03 UTC] [a9475] Running Matomo 4.15.1 as Super User INFO CoreAdminHome[2023-10-18 23:00:03 UTC] [a9475] --------------------------- INFO CoreAdminHome[2023-10-18 23:00:03 UTC] [a9475] NOTES INFO CoreAdminHome[2023-10-18 23:00:03 UTC] [a9475] - Async process archiving not supported, using curl requests. INFO CoreAdminHome[2023-10-18 23:00:03 UTC] [a9475] - Reports for today will be processed at most every 900 seconds. You can change this value in Matomo UI > Settings > General Settings. INFO CoreAdminHome[2023-10-18 23:00:03 UTC] [a9475] - Archiving was last executed without error 2 Minuten 24s ago. INFO CoreAdminHome[2023-10-18 23:00:03 UTC] [a9475] --------------------------- INFO CoreAdminHome[2023-10-18 23:00:03 UTC] [a9475] START INFO CoreAdminHome[2023-10-18 23:00:03 UTC] [a9475] Starting Matomo reports archiving... INFO CoreAdminHome[2023-10-18 23:00:03 UTC] [a9475] Start processing archives for site 1. INFO CoreAdminHome[2023-10-18 23:00:03 UTC] [a9475] Will invalidate archived reports for today in site ID = 1's timezone (2023-10-19 00:00:00). INFO CoreAdminHome[2023-10-18 23:00:04 UTC] [a9475] Will invalidate archived reports for yesterday in site ID = 1's timezone (2023-10-18 00:00:00). INFO CoreAdminHome[2023-10-18 23:00:05 UTC] [a9475] Finished archiving for site 1, 0 API requests, Time elapsed: 1.103s [1 / 1 done] INFO CoreAdminHome[2023-10-18 23:00:05 UTC] [a9475] Done archiving! INFO CoreAdminHome[2023-10-18 23:00:05 UTC] [a9475] --------------------------- INFO CoreAdminHome[2023-10-18 23:00:05 UTC] [a9475] SUMMARY INFO CoreAdminHome[2023-10-18 23:00:05 UTC] [a9475] Processed 0 archives. INFO CoreAdminHome[2023-10-18 23:00:05 UTC] [a9475] Total API requests: 0 INFO CoreAdminHome[2023-10-18 23:00:05 UTC] [a9475] done: 0 req, 1222 ms, no error INFO CoreAdminHome[2023-10-18 23:00:05 UTC] [a9475] Time elapsed: 1.222s INFO CoreAdminHome[2023-10-18 23:00:05 UTC] [a9475] --------------------------- INFO CoreAdminHome[2023-10-18 23:00:05 UTC] [a9475] SCHEDULED TASKS INFO CoreAdminHome[2023-10-18 23:00:05 UTC] [a9475] Starting Scheduled tasks... > INFO CoreAdminHome[2023-10-18 23:00:05 UTC] [a9475] Scheduler: executing task Piwik\Plugins\CustomAlerts\Tasks.runAlertsDaily_1... INFO CoreAdminHome[2023-10-18 23:00:05 UTC] [a9475] Scheduler: finished. Time elapsed: 0.440s INFO CoreAdminHome[2023-10-18 23:00:05 UTC] [a9475] done INFO CoreAdminHome[2023-10-18 23:00:05 UTC] [a9475] ---------------------------
INFO CoreAdminHome[2023-10-18 23:05:02 UTC] [26365] --------------------------- INFO CoreAdminHome[2023-10-18 23:05:02 UTC] [26365] INIT INFO CoreAdminHome[2023-10-18 23:05:02 UTC] [26365] Running Matomo 4.15.1 as Super User INFO CoreAdminHome[2023-10-18 23:05:02 UTC] [26365] --------------------------- INFO CoreAdminHome[2023-10-18 23:05:02 UTC] [26365] NOTES INFO CoreAdminHome[2023-10-18 23:05:02 UTC] [26365] - Async process archiving not supported, using curl requests. INFO CoreAdminHome[2023-10-18 23:05:02 UTC] [26365] - Reports for today will be processed at most every 900 seconds. You can change this value in Matomo UI > Settings > General Settings. INFO CoreAdminHome[2023-10-18 23:05:02 UTC] [26365] - Archiving was last executed without error 4 Minuten 57s ago. INFO CoreAdminHome[2023-10-18 23:05:02 UTC] [26365] --------------------------- INFO CoreAdminHome[2023-10-18 23:05:02 UTC] [26365] START INFO CoreAdminHome[2023-10-18 23:05:02 UTC] [26365] Starting Matomo reports archiving... INFO CoreAdminHome[2023-10-18 23:05:02 UTC] [26365] Start processing archives for site 1. INFO CoreAdminHome[2023-10-18 23:05:02 UTC] [26365] Will invalidate archived reports for today in site ID = 1's timezone (2023-10-19 00:00:00). INFO CoreAdminHome[2023-10-18 23:05:02 UTC] [26365] Will invalidate archived reports for yesterday in site ID = 1's timezone (2023-10-18 00:00:00). INFO CoreAdminHome[2023-10-18 23:05:02 UTC] [26365] Finished archiving for site 1, 0 API requests, Time elapsed: 0.333s [1 / 1 done] INFO CoreAdminHome[2023-10-18 23:05:02 UTC] [26365] Done archiving! INFO CoreAdminHome[2023-10-18 23:05:02 UTC] [26365] --------------------------- INFO CoreAdminHome[2023-10-18 23:05:02 UTC] [26365] SUMMARY INFO CoreAdminHome[2023-10-18 23:05:02 UTC] [26365] Processed 0 archives. INFO CoreAdminHome[2023-10-18 23:05:02 UTC] [26365] Total API requests: 0 INFO CoreAdminHome[2023-10-18 23:05:02 UTC] [26365] done: 0 req, 369 ms, no error INFO CoreAdminHome[2023-10-18 23:05:02 UTC] [26365] Time elapsed: 0.369s INFO CoreAdminHome[2023-10-18 23:05:02 UTC] [26365] --------------------------- INFO CoreAdminHome[2023-10-18 23:05:02 UTC] [26365] SCHEDULED TASKS INFO CoreAdminHome[2023-10-18 23:05:03 UTC] [26365] Starting Scheduled tasks... INFO CoreAdminHome[2023-10-18 23:05:03 UTC] [26365] Scheduler: executing task Piwik\Plugins\CustomJsTracker\Tasks.updateTracker... INFO CoreAdminHome[2023-10-18 23:05:03 UTC] [26365] Scheduler: finished. Time elapsed: 0.037s INFO CoreAdminHome[2023-10-18 23:05:03 UTC] [26365] Scheduler: executing task Piwik\Plugins\TagManager\Tasks.regenerateReleasedContainers... INFO CoreAdminHome[2023-10-18 23:05:03 UTC] [26365] Scheduler: finished. Time elapsed: 0.171s INFO CoreAdminHome[2023-10-18 23:05:03 UTC] [26365] Scheduler: executing task Piwik\Plugins\AdvertisingConversionExport\Tasks.prepareExportsIfNeeded... INFO CoreAdminHome[2023-10-18 23:05:03 UTC] [26365] Scheduler: finished. Time elapsed: 0.008s INFO CoreAdminHome[2023-10-18 23:05:03 UTC] [26365] Scheduler: executing task Piwik\Plugins\CustomAlerts\Tasks.runAlertsDaily_1... INFO CoreAdminHome[2023-10-18 23:05:03 UTC] [26365] Scheduler: finished. Time elapsed: 0.170s INFO CoreAdminHome[2023-10-18 23:05:03 UTC] [26365] Scheduler: executing task Piwik\Plugins\PrivacyManager\Tasks.deleteLogData... INFO CoreAdminHome[2023-10-18 23:05:03 UTC] [26365] Scheduler: finished. Time elapsed: 0.000s INFO CoreAdminHome[2023-10-18 23:05:03 UTC] [26365] Scheduler: executing task Piwik\Plugins\PrivacyManager\Tasks.anonymizePastData... INFO CoreAdminHome[2023-10-18 23:05:03 UTC] [26365] Scheduler: finished. Time elapsed: 0.000s INFO CoreAdminHome[2023-10-18 23:05:03 UTC] [26365] done INFO CoreAdminHome[2023-10-18 23:05:03 UTC] [26365] ---------------------------
Hi @utrautmann . Thank you for the additional information. What you're describing appears to be an issue with the scheduler, which is part of Matomo core and I believe has been fixed in Matomo 5.
The fix for this problem will actually be part of Matomo 5.1.0: https://github.com/matomo-org/matomo/pull/21795
Internal testing seems to validate that has indeed been solved in 5.1.0 and is no longer happening. In case someone still has the issue after 5.1.0, feel free to reopen the ticket.
@Stan-vw last night I've got two emails about the same alert (Matomo 5.1.0, Plugin 5.0.5)
@AltamashShaikh any thoughts on why this might still happen as per the message above?
@Stan-vw Not sure, why will this happen @utrautmann is this happening consistently or was only 1 of case ?
Since my comment there have been further alerts, but the double alerts has not happened again. I would inform here if it occurs again.
@utrautmann Thanks for your reply, looks like one of case, could be due to caching of old code.
@AltamashShaikh Last night Matomo sent the same alert twice. See here:
Configuration: Matomo version: 5.1.1 MySQL version: 5.7.44-1 PHP version: 8.3.10 CustomAlerts (5.0.5)
@sgiehl Do you know what could be the issue here ?
I have 5 alerts configured.
The system sent me 8 same/similar emails when 1 email would have been expected.
This isn't the first time but had this issue before.
Matomo should check if the alert has been processed recently and if so, don't process it again.
I'll post more details internally.