Quartz.net 3.0 High CPU spikes and missing triggers

431 views
Skip to first unread message

Huzaifa Kagazwala

unread,
Feb 12, 2018, 2:52:56 PM2/12/18
to Quartz.NET
Hello All,

We recently upgraded our code to use 3.0 version and observed that the CPU usage of the service spiked up considerably now the service would spike cpu at times to up to 50%. The other major issue we faced was that the schedule were not being fired. We create a lot of schedules around 20000 or so each to fire generally in intervals of 30 mins. We found in our testing that the trigger went going off, so we took the crash dump of the service and on inspecting we found that the trigger PreviousFireTimeUtc and NextFireTimeUtc times were hours apart instead of 30 mins. Another strange thing was that the fire count was correctly reflecting firing count based on the interval of 30 mins. 

has anyone else seen this behavior.

var properties = new NameValueCollection
                {
                    { "quartz.scheduler.instanceName", "test12" },
                    { "quartz.scheduler.instanceId", "test12" },
                    {                      
                        "quartz.threadPool.threadCount", "8"
                    }
                };
                var QuartzScheduler = new StdSchedulerFactory(properties).GetScheduler().Result;

Note: we roll backed to 2.6 version and everything was fine. 

Thanks,
Huzaifa

Marko Lahma

unread,
Feb 13, 2018, 11:12:02 AM2/13/18
to Quartz. NET
This sounds troubling indeed, I'd love to get some help so if you have
time to debug and investigate further that would be much appreciated.

-Marko
> --
> You received this message because you are subscribed to the Google Groups
> "Quartz.NET" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to quartznet+...@googlegroups.com.
> To post to this group, send email to quar...@googlegroups.com.
> Visit this group at https://groups.google.com/group/quartznet.
> For more options, visit https://groups.google.com/d/optout.

Michael Aird

unread,
Aug 1, 2018, 11:48:24 AM8/1/18
to Quartz.NET
Did this investigation turn up anything?

We're running into a slightly similar issue. we're experiencing occasional spikes in CPU and jobs that are running but are not in the QRTZ_FIRED_TRIGGERS table.

Any thoughts on how to diagnose this?

Sean Farrow

unread,
Aug 1, 2018, 3:40:32 PM8/1/18
to quar...@googlegroups.com

Hi Michael,

 

Without knowing your setup, it's difficult to give concrete recommendations, but can you confirm the jobs are actually running? Have you added a job or trigger listener to the scheduler? Also, are any of the jobs throwing exceptions when they are run?

 

Finally, how often do these CPU spikes occur and do they occur with any specific job? If yes, can you give us an outline as to what that job is doing and if it's accessing any external resources.

 

Hopefully some of this gives you some ideas and with answers to the above questions further diagnostics might come to light.

 

Kind regards

Shaun.

Michael Aird

unread,
Aug 1, 2018, 7:50:35 PM8/1/18
to quar...@googlegroups.com
Sean,

The job is sending a batch of emails. It accessed several external resources including a report generation service that attaches a PDF. 

We could tell
The job was still running because related tables were updated with the batch progress. 

I’ll check for exceptions on the case that happened today. 

You received this message because you are subscribed to a topic in the Google Groups "Quartz.NET" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/quartznet/1ENjAYAKTnI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to quartznet+...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages