Yarn network troubles

It seems that the build always runs into network problems when installing yarn dependencies only on Windows.

[3/5] Fetching packages…
info There appears to be trouble with your network connection. Retrying…
info There appears to be trouble with your network connection. Retrying…
info There appears to be trouble with your network connection. Retrying…

https://travis-ci.org/thelounge/thelounge/jobs/440995140#L79

Interesting. Could you try increasing the network timeout?

In your .travis.yml:

before_install: yarn install --network-timeout 1000000

That removed the info message, however the install is still pretty slow. It takes multiple minutes to install dependencies (the project certainly doesn’t have THAT many dependencies, and it’s quite a bit faster on my local machine with home internet speeds)

And to clarify, I disabled cache: yarn, and installing on linux takes 20 seconds compared to minutes on Windows.

Build: https://travis-ci.org/thelounge/thelounge/builds/441035440

Thanks for the info. The Windows filesystem seems to be a bit slower, although we still have lots of tuning and improving yet to do. Caching is disable for all windows builds for the time being while we update some of our code to work with Windows. We hope to have it available next week.

For the time being I would class the initial issue as resolved, although we should document this, or apply the yarn timeout ourselves so others don’t need to.

Thank you for this feedback!

I don’t consider this issue solved, if anything it got worse.

Here’s latest build: https://travis-ci.com/thelounge/thelounge/builds/98297848

1 minute for Linux, 14 minutes for Windows. Almost 8 minutes of which are spent in Yarn.

Windows file system is slower, but it’s not that slow.

Disabling Windows Defender Realtime Monitoring boosts my yarn install from 900s to 180s. And I don’t get any network related issues.

export NODEPATH=$(where.exe node.exe)
export PROJECTDIR=$(pwd)
export YARNCACHE=$(yarn cache dir)
export TEMPDIR=$LOCALAPPDATA\\Temp

powershell Add-MpPreference -ExclusionProcess ${NODEPATH}
powershell Add-MpPreference -ExclusionPath ${YARNCACHE}
powershell Add-MpPreference -ExclusionPath ${PROJECTDIR}
powershell Add-MpPreference -ExclusionPath ${TEMPDIR}

echo "DisableArchiveScanning..."
powershell Start-Process -PassThru -Wait PowerShell -ArgumentList "'-Command Set-MpPreference -DisableArchiveScanning \$true'"

echo "DisableBehaviorMonitoring..."
powershell Start-Process -PassThru -Wait PowerShell -ArgumentList "'-Command Set-MpPreference -DisableBehaviorMonitoring \$true'"

echo "DisableRealtimeMonitoring..."
powershell Start-Process -PassThru -Wait PowerShell -ArgumentList "'-Command Set-MpPreference -DisableRealtimeMonitoring \$true'"
1 Like

I can confirm, disabling Windows Defender actually allowed my Windows job to complete well within the 50-minute limit. Everything from casher to MSYS2 installation to git submodule update --recursive on Boost was super-fast.