Commit f31344b1 authored by Vishnu Karthik Ravindran's avatar Vishnu Karthik Ravindran Committed by Daniel Robinson
Browse files

set default gomaxproc value to one for Windows to avoid random window halts

cr: https://code.amazon.com/reviews/CR-54930927
parent 09ab4ddd
......@@ -18,6 +18,7 @@ import (
"os"
"os/signal"
"path/filepath"
"runtime"
"runtime/debug"
"syscall"
......@@ -187,6 +188,8 @@ func run(log logger.T, shouldCheckHibernation bool) {
}
}()
log.Debugf("Current GoMaxProc value - %v", runtime.GOMAXPROCS(0))
log.WriteEvent(logger.AgentTelemetryMessage, "", logger.AmazonAgentWorkerStartEvent)
// run ssm agent
agent, err := start(log, instanceIDPtr, regionPtr, shouldCheckHibernation)
......
......@@ -129,6 +129,10 @@ func DefaultConfig() SsmagentConfig {
ForceFileIPC: false,
GoMaxProcForAgentWorker: 0,
}
// setting the default GoMaxProc value to 1 for windows
if runtime.GOOS == "windows" {
agent.GoMaxProcForAgentWorker = 1
}
var os = OsInfo{
Lang: "en-US",
Version: "1",
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment