5

使用Hangfire定时抓取别人接口,运行一段时间发生一下问题

 3 years ago
source link: https://bbs.csdn.net/topics/399173459
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

使用Hangfire定时抓取别人接口,运行一段时间发生一下问题

Web 开发 > IIS [问题点数:100分]

发生一个或多个错误。

System.AggregateException: 发生一个或多个错误。 ---> System.Net.Http.HttpRequestException: 发送请求时出错。 ---> System.Net.WebException: 基础连接已经关闭: 连接被意外关闭。
   在 System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
   在 System.Net.Http.HttpClientHandler.GetResponseCallback(IAsyncResult ar)
   --- 内部异常堆栈跟踪的结尾 ---
   --- 内部异常堆栈跟踪的结尾 ---
---> (内部异常 #0) System.Net.Http.HttpRequestException: 发送请求时出错。 ---> System.Net.WebException: 基础连接已经关闭: 连接被意外关闭。
   在 System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
   在 System.Net.Http.HttpClientHandler.GetResponseCallback(IAsyncResult ar)


备注:1.我拿着相应数据去postman测试,发现也出现一样的问题
        2.刚开始可以,运行一段时间就出问题了
        3.服务是挂载在IIS运行的

4.有意思的是,我用postman把对方给的token值放头部请求,说无响应,但是我把这个token值取很小一部分,服务器有响应了


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK