当尝试检查Quartz.NET中是否存在作业时,它随机失败并出现以下错误:
Couldn't commit ADO.NET transaction. Transaction not connected, or was disconnected
这是堆栈跟踪:
at Quartz.Impl.AdoJobStore.JobStoreSupport.CommitConnection(ConnectionAndTransactionHolder cth, Boolean openNewTransaction) in c:\projects\quartznet\src\Quartz\Impl\AdoJobStore\JobStoreSupport.cs:line 3403
at Quartz.Impl.AdoJobStore.JobStoreSupport.ExecuteInNonManagedTXLock[T](String lockName, Func`2 txCallback, Func`3 txValidator) in c:\projects\quartznet\src\Quartz\Impl\AdoJobStore\JobStoreSupport.cs:line 3562
at Quartz.Impl.AdoJobStore.JobStoreTX.ExecuteInLock[T](String lockName, Func`2 txCallback) in c:\projects\quartznet\src\Quartz\Impl\AdoJobStore\JobStoreTX.cs:line 76
at Quartz.Impl.AdoJobStore.JobStoreSupport.ExecuteWithoutLock[T](Func`2 txCallback) in c:\projects\quartznet\src\Quartz\Impl\AdoJobStore\JobStoreSupport.cs:line 3418
at Quartz.Impl.AdoJobStore.JobStoreSupport.CheckExists(JobKey jobKey) in c:\projects\quartznet\src\Quartz\Impl\AdoJobStore\JobStoreSupport.cs:line 1739
at Quartz.Core.QuartzScheduler.CheckExists(JobKey jobKey) in c:\projects\quartznet\src\Quartz\Core\QuartzScheduler.cs:line 1399
at Quartz.Impl.StdScheduler.CheckExists(JobKey jobKey) in c:\projects\quartznet\src\Quartz\Impl\StdScheduler.cs:line 354
我的配置:
["quartz.jobStore.type"] = "Quartz.Impl.AdoJobStore.JobStoreTX, Quartz",
["quartz.jobStore.driverDelegateType"] = "Quartz.Impl.AdoJobStore.SqlServerDelegate, Quartz",
["quartz.jobStore.tablePrefix"] = "QRTZ_",
["quartz.jobStore.dataSource"] = "rubis",
["quartz.dataSource.rubis.connectionStringName"] = "RubisEntities",
["quartz.dataSource.rubis.provider"] = "SqlServer-20",
["quartz.jobStore.useProperties"] = "true",
["quartz.threadPool.threadCount"] = "20"
我不知道我错过了什么,我找不到总是发生的情况。它随机失败。