首页 新闻 搜索 专区 学院

System.Net.Http.HttpRequestException: Resource temporarily unavailable

0
悬赏园豆:50 [待解决问题]

Linux,net core, httpclient发送http请求的时候,偶现System.Net.Http.HttpRequestException: Resource temporarily unavailable

异常信息如下:

at System.Net.Http.ConnectHelper.ConnectAsync(String host, Int32 port, CancellationToken cancellationToken)|Source:System.Net.Http|异常:{"Message":"Resource temporarily unavailable","Data":{},"InnerException":{"ClassName":"System.Net.Sockets.SocketException","Message":"Resource temporarily unavailable","Data":null,"InnerException":null,"HelpURL":null,"StackTraceString":" at System.Net.Http.ConnectHelper.ConnectAsync(String host, Int32 port, CancellationToken cancellationToken)","RemoteStackTraceString":null,"RemoteStackIndex":0,"ExceptionMethod":null,"HResult":-2147467259,"Source":"System.Private.CoreLib","WatsonBuckets":null,"NativeErrorCode":11},"StackTrace":" at System.Net.Http.ConnectHelper.ConnectAsync(String host, Int32 port, CancellationToken cancellationToken)\n at System.Threading.Tasks.ValueTask1.get_Result()\n at System.Net.Http.HttpConnectionPool.CreateConnectionAsync(HttpRequestMessage request, CancellationToken cancellationToken)\n at System.Threading.Tasks.ValueTask1.get_Result()\n at System.Net.Http.HttpConnectionPool.WaitForCreatedConnectionAsync(ValueTask1 creationTask)\n at System.Threading.Tasks.ValueTask1.get_Result()\n at System.Net.Http.HttpConnectionPool.SendWithRetryAsync(HttpRequestMessage request, Boolean doRequestAuth, CancellationToken cancellationToken)\n at System.Net.Http.RedirectHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)\n at Microsoft.Extensions.Http.Logging.LoggingHttpMessageHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)\n at Microsoft.Extensions.Http.Logging.LoggingScopeHttpMessageHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)\n at System.Net.Http.HttpClient.FinishSendAsyncBuffered(Task`1 sendTask, HttpRequestMessage request, CancellationTokenSource cts, Boolean disposeCts)\n at MerchantsApi.Proxies.OperateProxy.GetBlackListAsync(GetBlackListRequest requests) in /src/MerchantsApi/Proxies/OperateProxy.cs:line 51\n at MerchantsApi.Service.MerchantBalanceAuthenticationService.AuthAsync(BalanceInfo balance, PlatformInfo platformInfo, Boolean ifSkipRisk, Boolean verifyOnlyRisk) in /src/MerchantsApi/Service/MerchantBalanceAuthenticationService.cs:line 115\n at MerchantsApi.Controllers.BalanceController.VersionDataAsync(BillInfo info) in /src/MerchantsApi/Controllers/BalanceController.cs:line 470","HelpLink":null,"Source":"System.Net.Http","HResult":-2147467259}

chesterdotchen的主页 chesterdotchen | 小虾三级 | 园豆:505
提问于:2019-12-26 09:48
< >
分享
所有回答(3)
0

代码看看

网址不稳定???

IDOER | 园豆:36 (初学一级) | 2019-12-26 10:17

支持(0) 反对(0) chesterdotchen | 园豆:505 (小虾三级) | 2019-12-26 10:18
0

线程开多了,linux进行了资源限制

风浪 | 园豆:2861 (老鸟四级) | 2019-12-26 10:26

什么情况下会有线程开多的情况?

支持(0) 反对(0) chesterdotchen | 园豆:505 (小虾三级) | 2019-12-26 10:27
0

https://blog.csdn.net/chenlin465373800/article/details/78924780
我觉得可能时TCP链接数量达到系统限制。 打印一下netstat看看有多少链接。

仙贝 | 园豆:175 (初学一级) | 2019-12-26 11:04
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册