You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sometimes I am suffering from a Connection Timeout error when using InstallFast on specific modules:
Exception calling "GetResult" with "0" argument(s): "The connection timed out from inactivity. (pwsh.gallery:443)"
I usually try again and it works though - but I wouldn't want to risk this kind of failure in a CI pipeline. Any idea what might be causing this? I don't have the same issue with the standard Install-Module. Are there any settings which might help me?
There is no retry logic in ModuleFast, it relies on the HTTP/2 and TCP mechanisms for that, so if for any reason a connection stalls or hangs, it tries to fail quickly. I've considered implementing this more robustly but it is difficult to do seeing as it is mostly written PowerShell which doesn't handle these bits very easily compared to C#.
I would recommend Wireshark or another mechanism to see if something is blocking or the packets are otherwise getting dropped, because they should retry and operate without issue, however it something happens on the Nuget Repository side (pwsh.gallery is a nuget v3 mirror of PowerShell Gallery) that drops the connection, modulefast will not retry.
You could have a simple loop that, if ModuleFast fails, simply retry. ModuleFast is deterministic, declarative, and atomic, it will simply pick up to install what modules were missing from the specification, and if any module wasn't completely installed, it will delete it and retry it, so you could have your CI pipeline retry 3 times (wrap modulefast in a do while or something) and then give up to make it a little more robust without requiring something on this side.
Activity
JustinGrote commentedon Jan 10, 2025
Thanks for your submission!
There is no retry logic in ModuleFast, it relies on the HTTP/2 and TCP mechanisms for that, so if for any reason a connection stalls or hangs, it tries to fail quickly. I've considered implementing this more robustly but it is difficult to do seeing as it is mostly written PowerShell which doesn't handle these bits very easily compared to C#.
I would recommend Wireshark or another mechanism to see if something is blocking or the packets are otherwise getting dropped, because they should retry and operate without issue, however it something happens on the Nuget Repository side (pwsh.gallery is a nuget v3 mirror of PowerShell Gallery) that drops the connection, modulefast will not retry.
You could have a simple loop that, if ModuleFast fails, simply retry. ModuleFast is deterministic, declarative, and atomic, it will simply pick up to install what modules were missing from the specification, and if any module wasn't completely installed, it will delete it and retry it, so you could have your CI pipeline retry 3 times (wrap modulefast in a do while or something) and then give up to make it a little more robust without requiring something on this side.