You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I created a simple report based on a view. The view normally takes around 13secs with a select * from. When an email report is schedule, hangfire retries the job in the event of an exception. My db ground to a halt. Looking at the processes, I see lots of queries being run (presumably by hangfire).
I'm currently investigating the root cause of the email exception and also why the queries aren't being terminated on exception, but in the meantime, BE CAREFUL SCHEDULING AN EMAIL IN PRODUCTION
The text was updated successfully, but these errors were encountered:
I think I may know what this is... Hangfire is designed to automatically retry the recurring job up to 10 times if it fails. You can change this by adding the following code to the top of the BuildScheduledEmail method of the ScheduledEmailManager:
[AutomaticRetry(Attempts = 5)] [DisableConcurrentExecution(10 * 60)] public void BuildScheduledEmail(string queryName, string editUrl, string recipients, int queryId)
This sets the retries to 5 and also turns off any jobs of the same type running concurrently (with a timeout of 10 minutes).
Let me know if this works for you.
I created a simple report based on a view. The view normally takes around 13secs with a
select * from
. When an email report is schedule, hangfire retries the job in the event of an exception. My db ground to a halt. Looking at the processes, I see lots of queries being run (presumably by hangfire).I'm currently investigating the root cause of the email exception and also why the queries aren't being terminated on exception, but in the meantime, BE CAREFUL SCHEDULING AN EMAIL IN PRODUCTION
The text was updated successfully, but these errors were encountered: