diff --git a/cmd/handler-api.go b/cmd/handler-api.go index e344095da..f15690e29 100644 --- a/cmd/handler-api.go +++ b/cmd/handler-api.go @@ -22,6 +22,7 @@ import ( "os" "runtime" "strconv" + "strings" "sync" "time" @@ -70,7 +71,7 @@ func cgroupMemLimit() (limit uint64) { if err != nil { return 0 } - limit, err = strconv.ParseUint(string(buf), 10, 64) + limit, err = strconv.ParseUint(strings.TrimSpace(string(buf)), 10, 64) if err != nil { // The kernel can return valid but non integer values // but still, no need to interpret more