Skip to content

Commit

Permalink
New configurations to windows git to prevent random mem issues (#197)
Browse files Browse the repository at this point in the history
* Update git settings to avoid crashing and mem issues

Signed-off-by: Peter Zhu <zhujiaxi@amazon.com>

* Add more changes to git on windows for stability

Signed-off-by: Peter Zhu <zhujiaxi@amazon.com>

* Remove comments

Signed-off-by: Peter Zhu <zhujiaxi@amazon.com>

* Remove comments

Signed-off-by: Peter Zhu <zhujiaxi@amazon.com>

Signed-off-by: Peter Zhu <zhujiaxi@amazon.com>
  • Loading branch information
peterzhuamazon authored Sep 2, 2022
1 parent e199218 commit 318355c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/compute/agent-nodes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
};
Expand Down
8 changes: 7 additions & 1 deletion packer/scripts/windows/scoop-install-commons.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 318355c

Please sign in to comment.