yuzd / Hangfire.HttpJob

httpjob for Hangfire,restful api for Hangfire,job调度与业务分离
https://github.com/yuzd/Hangfire.HttpJob/wiki
MIT License
634 stars 186 forks source link

httpjob api System.Threading.Tasks.TaskCanceledException #170

Closed jition1987 closed 2 years ago

jition1987 commented 2 years ago

Job Start Time:2022-08-24 19:26:20 +20msJobName:LZMD-GetFootballOddsLiveNoStart|QueuenName:default +23msJobParam:【{"Success":null,"Fail":null,"RecurringJobIdentifier":"Odds实时--足球盘口--未开赛--LZMD","Url":"http://localhost:7886/LZSport/GetFootballOddsLiveNoStart","Method":"get","Data":"","ContentType":"application/json","Timeout":1800000,"DelayFromMinutes":0,"RunAt":null,"Cron":"1/10 ","JobName":"LZMD-GetFootballOddsLiveNoStart","QueueName":"default","AgentClass":"","AgentTimeout":0,"SendSuccess":false,"SendFail":true,"Mail":"","EnableRetry":true,"RetryDelaysInSeconds":"20,30,60","RetryTimes":3,"BasicUserName":"","BasicPassword":"","Headers":{},"CallbackEL":"","TimeZone":"","DingTalk":null}】 +1m 50.029sSystem.Threading.Tasks.TaskCanceledException: The operation was canceled. ---> System.IO.IOException: Unable to read data from the transport connection: The I/O operation has been aborted because of either a thread exit or an application request.. ---> System.Net.Sockets.SocketException (995): The I/O operation has been aborted because of either a thread exit or an application request. --- End of inner exception stack trace --- at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.ThrowException(SocketError error, CancellationToken cancellationToken) at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.GetResult(Int16 token) at System.Net.Http.HttpConnection.SendAsyncCore(HttpRequestMessage request, CancellationToken cancellationToken) --- End of inner exception stack trace --- at System.Net.Http.HttpConnection.SendAsyncCore(HttpRequestMessage request, CancellationToken cancellationToken) at System.Net.Http.HttpConnectionPool.SendWithNtConnectionAuthAsync(HttpConnection connection, HttpRequestMessage request, Boolean doRequestAuth, CancellationToken cancellationToken) at System.Net.Http.HttpConnectionPool.SendWithRetryAsync(HttpRequestMessage request, Boolean doRequestAuth, CancellationToken cancellationToken) at System.Net.Http.HttpClient.FinishSendAsyncBuffered(Task1 sendTask, HttpRequestMessage request, CancellationTokenSource cts, Boolean disposeCts) at Hangfire.HttpJob.Server.HttpJob.Run(HttpJobItem item, PerformContext context, List1 logList, HttpJobItem parentJob) at Hangfire.HttpJob.Server.HttpJob.Excute(HttpJobItem item, String jobName, String queuename, Boolean isretry, PerformContext context) +1m 50.040sError retry limit reached

yuzd commented 2 years ago

你这个是最新版本的吗

jition1987 commented 2 years ago

如何查询是不是最新版本?大概是今年4月份下载的

yuzd commented 2 years ago

你看下你nuget装的是多少版本的

感觉你这个报错,还是请求超时了

默认HttpClient的兜底超时是1小时 https://github.com/yuzd/Hangfire.HttpJob/blob/master/Server/Hangfire.HttpJob/Server/HangfireHttpClientFactory.cs#L30

yuzd commented 2 years ago

也可以参考 https://github.com/yuzd/Hangfire.HttpJob/issues/107