Merge pull request #3578 from sofat1989/containerd-stress
update the max if cur will be greater than max for setting the limit
This commit is contained in:
commit
3ad49a208b
@ -31,6 +31,9 @@ func setRlimit() error {
|
||||
}
|
||||
if limit.Cur < rlimit {
|
||||
limit.Cur = rlimit
|
||||
if limit.Max < limit.Cur {
|
||||
limit.Max = limit.Cur
|
||||
}
|
||||
if err := syscall.Setrlimit(syscall.RLIMIT_NOFILE, &limit); err != nil {
|
||||
return err
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user