Skip to content

Commit 1d78031

Browse files
committed
enable refresh for automemlimit
Signed-off-by: Markus Blaschke <mblaschke82@gmail.com>
1 parent ab5e19b commit 1d78031

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

system/autolimits.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package system
33
import (
44
"log/slog"
55
"runtime"
6+
"time"
67

78
"github.com/KimMachineGun/automemlimit/memlimit"
89
humanize "github.com/dustin/go-humanize"
@@ -27,6 +28,7 @@ func AutoProcMemLimit(logger *slog.Logger) {
2728
),
2829
),
2930
memlimit.WithLogger(logger),
31+
memlimit.WithRefreshInterval(1*time.Minute),
3032
)
3133
if err != nil {
3234
logger.Error(`failed to set GOMEMLIMIT`, "error", err)

0 commit comments

Comments
 (0)