Package restore on mono super slow and tons of requests end up being cancelled #1590
Comments
Package restore is still very slow on mono 4.0.1. Any plans when performance will be improved? It takes more than 10 minutes to restore packages for normal MVC+EF project on OS X. However DNU on Windows restores it in 30-60 seconds. |
This is killing me too. I have a build process that wants to restore packages on Mono and it takes 15 minutes to restore packages. =( I think for the time being I'll archive them and unpack them manually from an earlier build. Would love for creative solutions/hacks outside of tar'ing up dependencies. |
@ryan1234 try using dnu from beta6 for restoring packages. It's single threaded and more reliable. OmniSharp does this. https://github.com/OmniSharp/omnisharp-roslyn/blob/master/build.sh#L7-L14 |
I'm still seeing this issue with Mono 4.0.1 and the latest beta6 (1.0.0-beta6-12226). It definitely looks like it's still trying to download packages in parallel. |
You can copy paste packages from a windows computer to a linux, it works fine |
I tried looking into this somewhat and haven't really been able to reproduce any obvious issues like observed by the OP. On Gentoo hardware with mono 4.3 + dnx 1.0.0-beta6-12256, I'm seeing total restore times typically around 1 minute. On a Ubuntu VM with mono 4.0.3 + dnx-1.0.0-beta6-12256, I'm seeing much the same thing. One problem I had on the Gentoo box was a lack of CA trust which caused restore to completely break altogether and never finish. I had to manually run Mono's |
facing same issue on Arch Linux. Finally got all packages to install after running dnu restore at least 5 times. Version : beta7-12264 |
same here. Debian 7.8 |
Are any of you running in a docker container? |
I'm having this problem using the microsoft/aspnet:1.0.0-beta5 Docker container |
I tried both on a natively installed Linux and a VM. Same issue on both. |
@ganeshran Are you using Mono 4.3? I've experienced similar issues until I switched to Mono JIT compiler version 4.0.1 (tarball Mon Apr 27 01:00:48 PDT 2015). (Currently I'm on beta6) |
@kplett i am using Mono 4.0.2. |
having the same issue when trying to run inside docker on digitalocean (german datacenter) following this tutorial http://blogs.msdn.com/b/webdev/archive/2015/01/14/running-asp-net-5-applications-in-linux-containers-with-docker.aspx using aspnet-Home\samples\latest\HelloWeb building and running a node container with an express app only takes a few seconds in the same environment |
I feel inclined to think this is a problem with Mono's It's worth investigating more to be sure, but it appears to me that this is a Mono problem, rather than a dnx problem. |
👍 @aggieben 's workaround (setting |
👍 It feels indistinguishable from restore on Windows now. Thanks! |
While we have replaced Mono's thread pool with Microsoft in recent versions of Mono (4.2 and github/mono/mono master), it is unlikely that the issue is related to the threadpool implementation and even with that implementation, these issues will likely surface. The sources are likely rooted here (while this information is old, chances are, some of the scenarios that made this bad are present in another form). http://www.mono-project.com/archived/articlethreadpool_deadlocks/ |
Addendum: we could figure out whether the source is the threadpool, or the BeginInvoke support if you try Mono/master which now uses the CLR's thread pool implementation. |
Indeed, I added |
Thanks everyone! Closing this one. |
For the record, the workaround of setting |
… from aspnet/dnx#1590 (comment) seems to fix it.
This was on mono 3.12.0.
We might be better off reducing the concurrency on mono and seeing if that helps. HttpClient has a default timeout and that's what is causing requests to be cancelled. It seems like there's an underlying queue limit being hit somewhere on mono and ServicePointManager isn't being respected.
/cc @bradwilson @ChengTian @migueldeicaza
The text was updated successfully, but these errors were encountered: