Closed gienec closed 7 years ago
What version are you using? There is a mess in the source code in branch master after yesterday merge, sorry, hope to fix It very soon
I'm using 1.6.7.24 nuget version.
Also there should be mentioned that this exception is not thrown all the time. It appears then job processing activity is high.
Looking at the call stack I'd say it happens on RedisMonitoringApi.JobDetails rather than in ScheduledJobs. Can you try to increase the redisSyncTimeOut to 5000 ? i.e. localhost:6379,syncTimeout=5000,allowAdmin=true
Also, what's your setup ? Are you running Redis on the same windows machine as hangfire ?
Redis and Hangfire run on different machines. Also Redis runs on Linux, syncTimeout
is default - 1000.
I've tried to skipJobDetails
and did calls only of SheduledJobs
and got exception of KeyNotFoundException
.
Increase of syncTimeout
didn't help.
Uhm... maybe the ContinueWith calls aren't somehow awaited correctly, could you verify it inserting a couple of lines in the code ?
Task.WaitAll(tasks);
//code insert starts here
if (scheduledJobs.Any(x=> !jobs.ContainsKey(x.Element)))
{
throw new HangFireRedisException("not all job were fetched correctly");
}
//code insert ends here
return new JobList<ScheduledJobDto>(scheduledJobs
inside the ScheduledJobs method, and let see if the exception is ever launched
Ok. I'll try to do it later and will report about results.
Any news on this ?
I stopped to use scheduled jobs. It's hard to reproduce this bug so I'll close it until I'll find out how exactly to reproduce it.
Hi, I get the exception
KeyNotFoundException
when I'm trying to fetch scheduled jobs via monitoring API methodScheduledJobs
. Stacktrace:Any ideas how it could be fixed plz?