PowerShellGallery icon indicating copy to clipboard operation
PowerShellGallery copied to clipboard

Powershell Gallery slowness: `Install-Module -Name Az` takes 60 minutes instead of 3

Open aristosvo opened this issue 4 years ago β€’ 63 comments

Hi πŸ‘‹πŸ½

Seems the PowerShell Gallery is very slow today! Didn't know where to report it other than here :)

Operations which take in a normal situation 3 minutes take now 60 minutes, see log file below:

InstallModule.log

aristosvo avatar Jul 06 '21 11:07 aristosvo

Thank you for reporting. We are having a look.

adityapatwardhan avatar Jul 06 '21 14:07 adityapatwardhan

I'll second this. Also experiencing this issue.

emarzanoBNY avatar Jul 06 '21 17:07 emarzanoBNY

We had some issues with CDN and now believe the slowness has been fixed, please let us know if this is not the case anymore.

adityapatwardhan avatar Jul 06 '21 18:07 adityapatwardhan

This looks like it used to be, thanks for the fix! πŸŽ‰

aristosvo avatar Jul 06 '21 19:07 aristosvo

Reopened, as it seems to recur..! It's kinda on and off again, ranging from the normal 3 minutes to 20 minutes.

aristosvo avatar Jul 07 '21 08:07 aristosvo

Yes the issue is still present this morning.

pucciniplagiarist avatar Jul 07 '21 08:07 pucciniplagiarist

Hi @aristosvo, @pucciniplagiarist thanks for reaching out. We are aware of this and the Gallery CDN availability should have stabilized by now. We are investigating into the root cause of this. You can follow the status of the gallery at this link: https://github.com/PowerShell/PowerShellGallery/blob/master/psgallery_status.md

anamnavi avatar Jul 08 '21 18:07 anamnavi

@anamnavi I don't know how it's possible, but our downloads are still taking 15-20 minutes instead of 3 previously..

aristosvo avatar Jul 13 '21 07:07 aristosvo

Just over an hour ago: Install-Module -Name Az -Scope CurrentUser -Repository PSGallery -Force

Elapsed time: 0:40:28.8844

vercellone avatar Jul 13 '21 23:07 vercellone

@aristosvo - can you please reopen the issue ? It is happening with us as well !

@anamnavi - saw the status page, it shows that the CDN issue is resolved, but its not.

gautamdsheth avatar Jul 20 '21 07:07 gautamdsheth

@gautamdsheth I can’t, sorry! You can open a new one if you want to!!

aristosvo avatar Jul 20 '21 08:07 aristosvo

We're working on a more long term fix for this since it's a long term issue. I re-opened the issue.

anamnavi avatar Jul 22 '21 20:07 anamnavi

I noticed on a fresh Windows 2019 build that it was extremely slow also but after upgrading key packages, installing ALL PowerShell Modules were significantly faster.

I was able to install the AZ Module in ~5 minutes after updating the relevant PowerShell packages.

Via Chocolatey, it took less than 30 seconds to download and install all the AZ Modules. YMMV

I found 3 different solutions:

1. Update PowerShell Packages/Modules (Works for All PowerShellGallery Module Installs)

To check versions of installed modules:

Get-Module -ListAvailable
or
Get-Module -Name PowerShellGet

To update the relevant packages:

Write-Output ==^> Install latest NuGet
Install-PackageProvider NuGet -Force

Write-Output ==^> Set PowerShell Gallery to Trusted
Set-PSRepository -Name PSGallery -InstallationPolicy Trusted

Write-Output ==^> Install latest PowerShellGet
# *PowerShellGet* also updates its dependency *PackageManagement*
Install-Module PowerShellGet -Force

Write-Output ==^> Install latest PSReadLine
Install-Module PSReadLine -Force

2. Install Azure PowerShell Module via MSI Package

You need to find the AZ release version you want to install and download it.

  • GitHub Repo for MSI - https://github.com/Azure/azure-powershell
  • Releases Page - https://github.com/Azure/azure-powershell/releases
  • 6.2.1 Release: https://github.com/Azure/azure-powershell/releases/tag/v6.2.1-July2021 (look under Assets)
  • 6.2.1 MSI Download Link: https://github.com/Azure/azure-powershell/releases/download/v6.2.1-July2021/Az-Cmdlets-6.2.1.34515-x64.msi

3. Install Azure PowerShell Module via Chocolatey

  • Azure PowerShell Chocolatey Package - https://community.chocolatey.org/packages/az.powershell
  • choco install az.powershell
  • choco install az.powershell --version=5.9.0 (If you need a specific version)

dhekimian avatar Jul 23 '21 00:07 dhekimian

Still having issues with this today. Do we have any timeline on this? Thanks.

bcassell avatar Jul 26 '21 19:07 bcassell

Facing this on our side too. 20 minutes to install Az.Accounts (5.x megabytes) :(

psyrus avatar Jul 27 '21 07:07 psyrus

This slowness is an issue for me today.

kaburkett avatar Jul 28 '21 17:07 kaburkett

Experiencing extreme slowness as well

fsckyes avatar Jul 28 '21 21:07 fsckyes

We are experiencing the same thing, which is a problem when using managed dependencies with Azure Functions. The download of managed dependencies from psgallery doesn't complete before the function execution timeout is reached.

jasonpnnl avatar Jul 28 '21 21:07 jasonpnnl

We're working on a long term solution for this. We've had consistent issues with our database connection pools maxing out, we've restarted our instances to reset the connection pools and this should provide a temporary solution. We'll continue to restart our instances if/when this issue arises so that there's minimal interruption until we have our permanent fix.

alerickson avatar Jul 29 '21 18:07 alerickson

Running into issues with this today using Azure Functions managed dependencies, it times out while downloading modules and causes the function to fail.

daltonscole avatar Aug 06 '21 22:08 daltonscole

@alerickson It's really horrible at the moment 😒

Edit: It takes over an hour to get Az, if we get it at all! Can you give us a workaround, is there a mirror we can use or something?

aristosvo avatar Aug 17 '21 09:08 aristosvo

Same here today, extremely slow

Robulane avatar Dec 06 '21 21:12 Robulane

Same here

dchasman avatar Dec 08 '21 17:12 dchasman

Same here :(

rdelcampog avatar Dec 09 '21 18:12 rdelcampog

Still extremely slow. Is there any solution in the pipeline? This problem has existed for months.

image

axel-dd avatar Jan 06 '22 14:01 axel-dd

Having the horrible performance issues now as well. Given this is backed by Microsoft, is this not using Azure auto scale features to avoid such problems???

SQLCanuck avatar Jan 06 '22 17:01 SQLCanuck

It's been really bad as of late. Any plans for improvements? Since version 7.0.0, I now download and install through the released bundle from github:

PSAz=$(curl -sL https://api.github.com/repos/Azure/azure-powershell/releases/latest | jq -r '.assets[].browser_download_url | select(. | endswith(".tar.gz"))')

mkdir -p /tmp/azcmdlets
curl -Lso /tmp/azcmdlets/az.tar.gz $PSAz
tar -xzf /tmp/azcmdlets/az.tar.gz -C /tmp/azcmdlets
pwsh /tmp/azcmdlets/InstallModule.ps1

monken avatar Jan 11 '22 16:01 monken

@monken Thanks for sharing your workaround. I also use it now.

axel-dd avatar Jan 11 '22 20:01 axel-dd

Hello, is there any progress on this issue ? Has been quite bad nowadays. Took 50 mins today

image

gautamdsheth avatar Feb 09 '22 13:02 gautamdsheth

We have the same issue when trying to install the Az module in hosted jobs running on windows-latest (still Windows Server 2019 so far) in Azure pipelines. Seems downloading it from github instead as @monken suggested makes it a lot more reliable so we'll be using that workaround at least until there is a resolution here.

ekdegerman avatar Feb 10 '22 16:02 ekdegerman