.net - Quartz.NET and Deadlocks -
i'm playing latest version of quartz.net. i'm using adojobstore (with sqlserver-20 delegate) store jobs. create new jobs way:
jobdetail jobdetail = new jobdetail("myjob", null, typeof(hellojob)); jobdetail.jobdatamap["dsa"] = "hello"; crontrigger trigger = new crontrigger("mytrigger", null, "0/1 * * * * ?"); trigger.starttimeutc = triggerutils.getevenhourdate(datetime.utcnow.addmonths(-3)); trigger.name = "mytrigger"; sched.schedulejob(jobdetail, trigger); // job
jobdetail jobdetail = new jobdetail("myjob_bye", null, typeof(hellojob)); jobdetail.jobdatamap["dsa"] = "good bye"; crontrigger trigger = new crontrigger("mytrigger", null, "0/2 * * * * ?"); trigger.starttimeutc = triggerutils.getevenhourdate(datetime.utcnow.addmonths(-3)); trigger.name = "mytrigger2"; sched.schedulejob(jobdetail, trigger); the problem when start scheduler, works (triggers jobs configured above) time , throws sqlexception message "transaction (process id 53) deadlocked on lock resources process , has been chosen deadlock victim. rerun transaction.". error occures in jobstoresupport.cs, line 4217. looks there's problem lock handling. has idea how can solve issue.
p.s. quartz assembly custom build i'm playing with. changed table , column names in adoconstants.cs , corresponding .sql file.
thanks support
i found out wrong. looks when using sql server, shouldn't use varchar datatype. quartz.net has problems it. instead, switch nvarchar , problem fixed.
Comments
Post a Comment