Skip to content

Commit

Permalink
Set LimitNOFILE=1048576 in containerd.service
Browse files Browse the repository at this point in the history
LimitNOFILE was either 1048576 or infinity since 2017
containerd@b009642
This means soft limit was at a minimum 1048576 since then.

Since systemd 240, infinity is 1073741816 which causes issue,
and we must for sure lower the hard limit.

Removing LimitNOFILE is equivalent to 1024:524288, which is the
standard on the host, but was not containerd default since 2017,
so when AWS recently tried they had to revert:
awslabs/amazon-eks-ami#1551

1048576:1048576 has been good since 2017, use that.

Signed-off-by: Etienne Champetier <e.champetier@ateme.com>
  • Loading branch information
champtar committed Jan 19, 2024
1 parent 6f44916 commit 27c87db
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions containerd.service
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ RestartSec=5
# in the kernel. We recommend using cgroups to do container-local accounting.
LimitNPROC=infinity
LimitCORE=infinity
# 1048576 (soft and hard) was the default before systemd 240
LimitNOFILE=1048576

# Comment TasksMax if your systemd version does not supports it.
# Only systemd 226 and above support this version.
Expand Down

0 comments on commit 27c87db

Please sign in to comment.