yuzd / Hangfire.HttpJob

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

Problems withs http jobs - HangFire #67

Closed RicardoBraga1996 closed 3 years ago

RicardoBraga1996 commented 3 years ago

We have the following error when calling an API in hangFire:

The error is as follows

"Headers": {} }】System.OperationCanceledException Messgae:The operation was canceled. StackTrace: at System.Net.Http.HttpClient.HandleFinishSendAsyncError(Exception e, CancellationTokenSource cts) at System.Net.Http.HttpClient.FinishSendAsyncBuffered(Task`1 sendTask, HttpRequestMessage request, CancellationTokenSource cts, Boolean disposeCts) at Hangfire.HttpJob.Server.HttpJob.Excute(HttpJobItemitem, String jobName, String queuename, Boolean isretry, PerformContext context)

Running in the Swagger if it works correctly.

I attach the screenshots about these errors. Please if you could help us.

@yuzd , @odinserj @HenryDaniJP88 [ Error1 Error2 Swagger_Run_Ok Swagger_Run_Ok_2

](url)

yuzd commented 3 years ago

What is the timeout you set

RicardoBraga1996 commented 3 years ago

The timeout is 5000 and the Hangfire.Https version is 2.2.3.

I attach the screenshots about the version and timeout on the HangFire dashboard.

TimeOut Version_Hangfire HttpJob (2 2 3)

I also refer to the class -> Hangfire.HttpJob/Server/HttpJob.cs: https://github.com/yuzd/Hangfire.HttpJob/blob/a02290f88f60659b712badea1c03f74ff34846e9/Hangfire.HttpJob/Server/HttpJob.cs#L165

yuzd commented 3 years ago

Want to confirm a few points

  1. What is the response time of your api when you use swagger to test
  2. The default timeout is 5 seconds, if your api is indeed timed out, that error message will appear。 You try to increase the timeout to see if it works
  3. Update to the last version of this lib if you can.
yuzd commented 3 years ago

I close this issue temporarily Please leave me message if you have any questions