Emails not sending over weekend.

Daniel Kasmar asked on July 8, 2024 15:57

Having an intermittent issue where emails from the CMS get stuck in a sort of purgatory. They are not sent by the scheduled task until the email queue is checked manually, then they are sent to the SMTP server. Oddly enough this behavior seems to happen most often over weekends. (Maybe coincidental, unsure.) As soon as the email queue is opened the emails are immediately sent to the SMTP server.

As far as I have been able to tell this is a task scheduler issue.

My app pools are set to AlwaysRunning on Azure Portal, per this article: https://devnet.kentico.com/articles/scheduled-tasks-not-working but it still seems to go to sleep when the production CMS is not being hit by users.

I took a look at this question https://devnet.kentico.com/questions/email-queue-2 and it seemed to fix the issue for a little bit. I set up a ping using Uptime Kuda running locally on my machine to keep the server awake per Brenden's answer, but it is seemingly no longer keeping the system awake. Checking the logs from Uptime Kuma it is pinging the server over the weekend.

Recent Answers


Brenden Kehren answered on July 8, 2024 16:11 (last edited on July 12, 2024 17:28)

Daniel,

If you're running that Uptime Kuda ping on your local machine, is your local machine going to sleep or standby when you're not using it? If so, I'd highly recommend setting up a resource in Azure Application Insights to keep your CMS site alive/monitor the up-time.

If you don't want to pay for it and your site is publically available, check out UptimeRobot.com.

0 votesVote for this answer Mark as a Correct answer

Daniel Kasmar answered on July 8, 2024 16:24

Possibly. When I look at the logs from Uptime Kuda, it doesn't show any downtime in those periods, but I'll try running the ping through UptimeRobot as well. Unfortunately it's one of those issues that is very hard to test against without waiting a week basically to just see what happens.

0 votesVote for this answer Mark as a Correct answer

Brenden Kehren answered on July 8, 2024 16:34

Uptime Kuda wouldn't show any downtime if the service wasn't running because your local machine was off. Check your local machine event logs to see if it went to sleep or not.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.