DNU Restore gives lots of “HTTP request timed out”

三世轮回 提交于 2019-12-09 18:08:42

问题


I'm trying to run the samples from https://github.com/aspnet/home.
But I'm having problems updating the references. The restore is very slow and fails for some packages:

  GET http://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='Microsoft.Framework.Configuration.EnvironmentVariables'
Warning: FindPackagesById: Microsoft.Framework.Configuration.EnvironmentVariables
  HTTP request timed out. Retrying.
  GET http://www.nuget.org/api/v2/FindPackagesById()?id='Microsoft.Framework.Configuration.EnvironmentVariables'
Warning: FindPackagesById: Microsoft.Framework.Configuration.Ini
  HTTP request timed out. Retrying.
  GET http://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='Microsoft.Framework.Configuration.Ini'
Warning: FindPackagesById: Microsoft.Framework.Configuration.Ini
  HTTP request timed out. Retrying.
  GET http://www.nuget.org/api/v2/FindPackagesById()?id='Microsoft.Framework.Configuration.Ini'
Warning: FindPackagesById: Microsoft.Framework.Logging
  HTTP request timed out. Retrying.
  GET http://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='Microsoft.Framework.Logging'
Warning: FindPackagesById: Microsoft.Framework.Logging
  HTTP request timed out. Retrying.
  GET http://www.nuget.org/api/v2/FindPackagesById()?id='Microsoft.Framework.Logging'
Warning: FindPackagesById: Newtonsoft.Json
  HTTP request timed out. Retrying.
  GET http://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='Newtonsoft.Json'
Warning: FindPackagesById: Newtonsoft.Json
  HTTP request timed out. Retrying.
  GET http://www.nuget.org/api/v2/FindPackagesById()?id='Newtonsoft.Json'
Error: FindPackagesById: Microsoft.AspNet.Mvc.Razor
  HTTP request timed out. Exiting.

I tried with different urls using nuget, myget, http, https.
I checked my internet connection. There is a related issue in the dnx repo, but it did not help.
Any workaround to try?

I'm using mono 4.0.3.20 on CentOS.


回答1:


Here is the workaround:

export MONO_THREADS_PER_CPU=2000

from http://www.mono-project.com/archived/articlethreadpool_deadlocks/



来源:https://stackoverflow.com/questions/31973803/dnu-restore-gives-lots-of-http-request-timed-out

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!