C
C#โ€ข15mo ago
Jaex

โ” Why could NuGet restore randomly timeout inside GitHub Actions?

So frequently nuget restore timeout inside GitHub Actions for months and I can't figure out what could be the reason for this. Is it could be because multiple GitHub Actions jobs trying to restore in same time and NuGet servers thinking it is spam and blocking it? build.yml: https://github.com/ShareX/ShareX/blob/develop/.github/workflows/build.yml#L72 failed workflow: https://github.com/ShareX/ShareX/actions/runs/4933908932/jobs/8818333221 Also I'm open to advices about how to retry GitHub Actions job when it fails once.
96 Replies
Unknown User
Unknown Userโ€ข15mo ago
Message Not Public
Sign In & Join Server To View
Jaex
Jaexโ€ข15mo ago
problem is because it happens randomly, even if i enable verbose logging, unfortunately we won't be able to reproduce the error immediately
Unknown User
Unknown Userโ€ข15mo ago
Message Not Public
Sign In & Join Server To View
Jaex
Jaexโ€ข15mo ago
but i have feeling that nuget servers just don't respond at all and then it timeouts
Jaex
Jaexโ€ข15mo ago
hm which one i should select gonna try -v d
Unknown User
Unknown Userโ€ข15mo ago
Message Not Public
Sign In & Join Server To View
Unknown User
Unknown Userโ€ข15mo ago
Message Not Public
Sign In & Join Server To View
Jaex
Jaexโ€ข15mo ago
normally it takes around 1 minute to restore so I still have doubts about it timeouts because it takes too long to restore people restore very huge files which would take long time i still think it timeout because 5 jobs in same time trying to restore and nuget servers spam protection stops responding to one of them then it timeout after that
Unknown User
Unknown Userโ€ข15mo ago
Message Not Public
Sign In & Join Server To View
Jaex
Jaexโ€ข15mo ago
i will ofc add logs but we won't be able to get results for some time ๐Ÿ˜„ i will let you know when timeout happens again we didn't had to wait too long it happened in first commit lol
Jaex
Jaexโ€ข15mo ago
GitHub
Added -Verbosity detailed ยท ShareX/ShareX@9873022
ShareX is a free and open source program that lets you capture or record any area of your screen and share it with a single press of a key. It also allows uploading images, text or other types of f...
Jaex
Jaexโ€ข15mo ago
NuGet.Commands.CommandException: MsBuild timeout out while trying to get project to project references.
time to Google it
Unknown User
Unknown Userโ€ข15mo ago
Message Not Public
Sign In & Join Server To View
Jaex
Jaexโ€ข15mo ago
i still cannot find solution on Google
Unknown User
Unknown Userโ€ข15mo ago
Message Not Public
Sign In & Join Server To View
Jaex
Jaexโ€ข15mo ago
weirdly it is happens so frequently
Unknown User
Unknown Userโ€ข15mo ago
Message Not Public
Sign In & Join Server To View
Jaex
Jaexโ€ข15mo ago
i think it started to happen after i added 5. job thats why i felt like it is spam protection all 5 jobs could be sharing same ip and when all do restore in same time nuget servers could be thinking it is spam
Unknown User
Unknown Userโ€ข15mo ago
Message Not Public
Sign In & Join Server To View
Jaex
Jaexโ€ข15mo ago
yea i wonder can i find someone from nuget team in this server to ask ๐Ÿ˜‚
Unknown User
Unknown Userโ€ข15mo ago
Message Not Public
Sign In & Join Server To View
Jaex
Jaexโ€ข15mo ago
i dont think so
Unknown User
Unknown Userโ€ข15mo ago
Message Not Public
Sign In & Join Server To View
Jaex
Jaexโ€ข15mo ago
i did not manually create lockfile and dunno what it is
Unknown User
Unknown Userโ€ข15mo ago
Message Not Public
Sign In & Join Server To View
Jaex
Jaexโ€ข15mo ago
btw i was thinking what if i use "powershell try catch" to try restore again, would it work?
Unknown User
Unknown Userโ€ข15mo ago
Message Not Public
Sign In & Join Server To View
Jaex
Jaexโ€ข15mo ago
doing one more restore at catch i mean
Unknown User
Unknown Userโ€ข15mo ago
Message Not Public
Sign In & Join Server To View
Jaex
Jaexโ€ข15mo ago
but i would prefer to solve the main issue because this delays builds 2 minutes+
Unknown User
Unknown Userโ€ข15mo ago
Message Not Public
Sign In & Join Server To View
Jaex
Jaexโ€ข15mo ago
-Project2ProjectTimeOut

Timeout in seconds for resolving project-to-project references.
-Project2ProjectTimeOut

Timeout in seconds for resolving project-to-project references.
I can try increasing this and see is it still timeout
nuget restore "${{ env.SOLUTION_FILE_PATH }}" -Project2ProjectTimeOut 300000 -Verbosity detailed
nuget restore "${{ env.SOLUTION_FILE_PATH }}" -Project2ProjectTimeOut 300000 -Verbosity detailed
5 mins timeout
Unknown User
Unknown Userโ€ข15mo ago
Message Not Public
Sign In & Join Server To View
Jaex
Jaexโ€ข15mo ago
waait is it seconds i used ms
Unknown User
Unknown Userโ€ข15mo ago
Message Not Public
Sign In & Join Server To View
Jaex
Jaexโ€ข15mo ago
MSBuild P2P timeout [ms]: 300000000 lol
Unknown User
Unknown Userโ€ข15mo ago
Message Not Public
Sign In & Join Server To View
Jaex
Jaexโ€ข15mo ago
yea logs mislead me
Unknown User
Unknown Userโ€ข15mo ago
Message Not Public
Sign In & Join Server To View
Jaex
Jaexโ€ข15mo ago
i dont think it can use same location on disk but how ip can be same is i dunno
Unknown User
Unknown Userโ€ข15mo ago
Message Not Public
Sign In & Join Server To View
Jaex
Jaexโ€ข15mo ago
one job currently stuck in nuget restore btw
Jaex
Jaexโ€ข15mo ago
why github actions logs don't have timestamp blobthinking had them when you hovered line number
Unknown User
Unknown Userโ€ข15mo ago
Message Not Public
Sign In & Join Server To View
Jaex
Jaexโ€ข15mo ago
jesus it took 5 minutes to complete
Unknown User
Unknown Userโ€ข15mo ago
Message Not Public
Sign In & Join Server To View
Jaex
Jaexโ€ข15mo ago
so my theory of spam protection is invalidated
Unknown User
Unknown Userโ€ข15mo ago
Message Not Public
Sign In & Join Server To View
Jaex
Jaexโ€ข15mo ago
GitHub
Added -Project2ProjectTimeOut 300000 ยท ShareX/ShareX@3b88f13
ShareX is a free and open source program that lets you capture or record any area of your screen and share it with a single press of a key. It also allows uploading images, text or other types of f...
Unknown User
Unknown Userโ€ข15mo ago
Message Not Public
Sign In & Join Server To View
Jaex
Jaexโ€ข15mo ago
you can see the full logs right? when i open the page in browser incognito mode i cant see the logs
Unknown User
Unknown Userโ€ข15mo ago
Message Not Public
Sign In & Join Server To View
Jaex
Jaexโ€ข15mo ago
but probably requires login
Unknown User
Unknown Userโ€ข15mo ago
Message Not Public
Sign In & Join Server To View
Jaex
Jaexโ€ข15mo ago
nuget docs said detailed is max for nuget restore dotnet restore had higher level but dunno would that arg work for nuget restore
Unknown User
Unknown Userโ€ข15mo ago
Message Not Public
Sign In & Join Server To View
Jaex
Jaexโ€ข15mo ago
i saw it right before see your ss ๐Ÿ˜‚ i assumed it would be available when hovered with cursor like in appveyor
Unknown User
Unknown Userโ€ข15mo ago
Message Not Public
Sign In & Join Server To View
Jaex
Jaexโ€ข15mo ago
MonkaChrist github machines rubbish
Unknown User
Unknown Userโ€ข15mo ago
Message Not Public
Sign In & Join Server To View
Jaex
Jaexโ€ข15mo ago
or nuget servers rubbish difficult to know
Unknown User
Unknown Userโ€ข15mo ago
Message Not Public
Sign In & Join Server To View
Jaex
Jaexโ€ข15mo ago
it is pretty small
Unknown User
Unknown Userโ€ข15mo ago
Message Not Public
Sign In & Join Server To View
Jaex
Jaexโ€ข15mo ago
i dont even know what that command does
Unknown User
Unknown Userโ€ข15mo ago
Message Not Public
Sign In & Join Server To View
Jaex
Jaexโ€ข15mo ago
-Verbosity [normal|quiet|detailed] are you sure thats usable in nuget cli because what you are looking at is dotnet restore cli
Unknown User
Unknown Userโ€ข15mo ago
Message Not Public
Sign In & Join Server To View
Unknown User
Unknown Userโ€ข15mo ago
Message Not Public
Sign In & Join Server To View
Jaex
Jaexโ€ข15mo ago
thank you
Unknown User
Unknown Userโ€ข15mo ago
Message Not Public
Sign In & Join Server To View
Jaex
Jaexโ€ข15mo ago
you helped to diagnose a lot ๐Ÿ˜‚ i was more clueless before now i'm closer
Unknown User
Unknown Userโ€ข15mo ago
Message Not Public
Sign In & Join Server To View
gerard
gerardโ€ข15mo ago
Maybe the problem is signature verification? It seems like it's a Windows thing: https://github.com/NuGet/Home/issues/11548 You can disable it with a env-variable:
Important: setting NUGET_CERT_REVOCATION_MODE to offline indeed improves restore times substantially (down to 1m 22s in this case). https://github.com/StackExchange/StackExchange.Redis/pull/1973/commits/275f5756cbc526df7e3bff8a82dac6dd52f2186d
GitHub
[Bug]: Slow Restores on Windows in GitHub Actions - Signature verif...
NuGet Product Used dotnet.exe Product Version 6.0.101 Repro Steps & Context Running an identical restore in GitHub Actions, times are dramatically higher on Windows agents (2019 and 2022 tested...
gerard
gerardโ€ข15mo ago
If it's still slow, maybe you can try Windows Server 2019 (windows-2019) because windows-2022 used to be much slower. I don't know if this is still the case: https://github.com/actions/runner-images/issues/5166
GitHub
Windows Server 2022 builds are taking 4x longer than on Windows Ser...
Description Over the last 2 weeks I've noticed runs on the windows-2022 image taking 4x longer, and sometimes more than that, than on the windows-2019 image. In all of these instances nothing&#...
Accord
Accordโ€ข14mo ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.
Jaex
Jaexโ€ข14mo ago
https://github.com/actions/cache/blob/main/examples.md#c---nuget I'm checking this now created empty packages.lock.json files which populated on first compile i wish i could use it in parent solution folder tho instead of each project folder
Jaex
Jaexโ€ข14mo ago
https://github.com/ShareX/ShareX/actions/caches they did not put download button so can't verify cache content notlikeblob
Unknown User
Unknown Userโ€ข14mo ago
Message Not Public
Sign In & Join Server To View
Jaex
Jaexโ€ข14mo ago
am i need to use another parameter for nuget to restore from cache https://github.com/ShareX/ShareX/blob/develop/.github/workflows/build.yml#L70
- name: NuGet Restore
if: steps.cache.outputs.cache-hit != 'true'
run: nuget restore MyProject.sln
- name: NuGet Restore
if: steps.cache.outputs.cache-hit != 'true'
run: nuget restore MyProject.sln
let me try this
Jaex
Jaexโ€ข14mo ago
@TeBeClone did you cache nuget packages before?
Unknown User
Unknown Userโ€ข14mo ago
Message Not Public
Sign In & Join Server To View
Jaex
Jaexโ€ข14mo ago
chatgpt couldn't help too ๐Ÿ˜‚ https://jaex.getsharex.com/2023/05/61KmjXWflu.png
Jaex
Jaexโ€ข14mo ago
it shows what i already did i wonder is this path wrong for Windows: path: ~/.nuget/packages but if it were wrong then cache would be empty https://github.com/ShareX/ShareX/actions/caches 34 MB there i have suspicion now that nuget actually using cache correctly but still "GenerateRestoreGraphFile" part takes all that time
Accord
Accordโ€ข14mo ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.
Want results from more Discord servers?
Add your server
More Posts
โ” How would I implement a toroidal universe?A while ago I had started a project to hopefully create John Conway's Game of Life. I have everythinโ” How would I have a compiled Class Library look for necessary reference in a folder other than ./I am creating a game mod via Melon Loader, and I want to have the compiled .dll look for its referenโ” asp.net MVC, can I store some data in a static variable to access in a future request??I might need to modify a current process where user uploads a shit ton of data via excel. the serverโ” journal system?https://www.youtube.com/watch?v=OWvicJkXv94 is there an easier way of implementing a journal system โ” Bug in blazor?Hello guys, i have encountered something strange in my blazor app. I'll try to explain it here. So iโ” Unescaping special charactersWorking on a little SaaS thumbnail preview tool I'm gonna sell, and special characters like apostropโ” How could I make it so that every tabpage on a tabcontrol fades in when you open them?How could I make it so that every tabpage on a tabcontrol fades in when you open them?โ” How to take a native crash [{0x7f803bba7228} + 0x3bd] + PDB/DLL and get a line number?I have a native crash from a .net application on macOS that contains some managed code in the stack.โ” .NET MAUI Blazor Windows Application does not startHi I wanted to deploy my application, I followed this tutorial: https://learn.microsoft.com/de-de/doโ” Ef core-Odd BehaviorSo straight into it, The mapping: builder.Entity<LessonPhase>(b => { b.ToTable(l