From 318355cf328193489db70dea249cb1e9d6e74042 Mon Sep 17 00:00:00 2001 From: Peter Zhu Date: Fri, 2 Sep 2022 16:17:25 -0400 Subject: [PATCH] New configurations to windows git to prevent random mem issues (#197) * Update git settings to avoid crashing and mem issues Signed-off-by: Peter Zhu * Add more changes to git on windows for stability Signed-off-by: Peter Zhu * Remove comments Signed-off-by: Peter Zhu * Remove comments Signed-off-by: Peter Zhu Signed-off-by: Peter Zhu --- lib/compute/agent-nodes.ts | 2 +- packer/scripts/windows/scoop-install-commons.ps1 | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/lib/compute/agent-nodes.ts b/lib/compute/agent-nodes.ts index 2e01c50e..04cf0a1c 100644 --- a/lib/compute/agent-nodes.ts +++ b/lib/compute/agent-nodes.ts @@ -146,7 +146,7 @@ export class AgentNodes { maxTotalUses: 10, minimumNumberOfSpareInstances: 2, numExecutors: 1, - amiId: 'ami-0be4c33e264a17641', + amiId: 'ami-0d09c60aa060b8e02', initScript: 'echo', remoteFs: 'C:\\Users\\Administrator\\jenkins', }; diff --git a/packer/scripts/windows/scoop-install-commons.ps1 b/packer/scripts/windows/scoop-install-commons.ps1 index 71ec6ccf..5c1677cd 100644 --- a/packer/scripts/windows/scoop-install-commons.ps1 +++ b/packer/scripts/windows/scoop-install-commons.ps1 @@ -24,11 +24,17 @@ $userenv = [System.Environment]::GetEnvironmentVariable("Path", "User") # Make sure mem size are set to avoid "Out of memory, malloc failed" issues on Windows git config --system core.packedGitLimit 128m git config --system core.packedGitWindowSize 128m +git config --system core.longPaths true git config --system pack.deltaCacheSize 128m git config --system pack.packSizeLimit 128m git config --system pack.windowMemory 128m -#git config --system http.postBuffer 524288000 # Comment it out for now as it is calling malloc issues +git config --system pack.window 0 +git config --system pack.threads 1 +git config --system core.compression 0 +git config --system protocol.version 1 git config --system --list +# Rename system32 find.exe in case it gets conflicted with POSIX find +mv -v 'C:\\Windows\\System32\\find.exe' 'C:\\Windows\\System32\\find_windows.exe' # Setup Repos (This has to happen after git is installed or will error out) scoop bucket add java