Skip to content

Commit e647984

Browse files
authored
fix: use the correct cgroup policy to work on most of the systems (#2421)
1 parent 44572bb commit e647984

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

router/cmd/plan_generator.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,7 @@ func PlanGenerator(args []string) {
104104
// More details: https://tip.golang.org/doc/gc-guide#Memory_limit
105105
mLimit, err := memlimit.SetGoMemLimitWithOpts(
106106
memlimit.WithRatio(0.9),
107-
// FromCgroupHybrid retrieves the memory limit from the cgroup v2 and v1 controller sequentially
108-
memlimit.WithProvider(memlimit.FromCgroupHybrid),
107+
memlimit.WithProvider(memlimit.FromCgroup),
109108
)
110109
if err == nil {
111110
logger.Info("GOMEMLIMIT set automatically", zap.String("size", humanize.Bytes(uint64(mLimit))))

router/core/supervisor_instance.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ func newRouter(ctx context.Context, params RouterResources, additionalOptions ..
4141
// More details: https://tip.golang.org/doc/gc-guide#Memory_limit
4242
mLimit, err := memlimit.SetGoMemLimitWithOpts(
4343
memlimit.WithRatio(0.9),
44-
memlimit.WithProvider(memlimit.FromCgroupHybrid),
44+
memlimit.WithProvider(memlimit.FromCgroup),
4545
)
4646
if err == nil {
4747
params.Logger.Info("GOMEMLIMIT set automatically", zap.String("limit", humanize.Bytes(uint64(mLimit))))

0 commit comments

Comments
 (0)