Merge pull request #1906 from stevvooe/change-on-oom-failure
server: only warn on failed OOM score adjust
This commit is contained in:
commit
03bc5e974d
@ -19,9 +19,9 @@ func apply(ctx context.Context, config *Config) error {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if config.OOMScore != 0 {
|
if config.OOMScore != 0 {
|
||||||
log.G(ctx).Infof("changing OOM score to %d", config.OOMScore)
|
log.G(ctx).Debugf("changing OOM score to %d", config.OOMScore)
|
||||||
if err := sys.SetOOMScore(os.Getpid(), config.OOMScore); err != nil {
|
if err := sys.SetOOMScore(os.Getpid(), config.OOMScore); err != nil {
|
||||||
return err
|
log.G(ctx).WithError(err).Errorf("failed to change OOM score to %d", config.OOMScore)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if config.Cgroup.Path != "" {
|
if config.Cgroup.Path != "" {
|
||||||
|
Loading…
Reference in New Issue
Block a user