-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
File descriptor limit change in AMI release v20231220
#1551
Comments
We have hit this issue too, we have about ~1700 pods crashlooping in each cluster. I wonder if the CI doesn't test using a large enough workload? |
We have already reverted the change that caused this issue (#1535), EDIT: We're not rolling back |
It help us to restore our pods on new nodes, we using Karpenter apiVersion: karpenter.k8s.aws/v1alpha1
kind: AWSNodeTemplate
...
spec:
....
userData: |
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="BOUNDARY"
--BOUNDARY
Content-Type: text/x-shellscript; charset="us-ascii"
#!/bin/bash
rm -rf /etc/systemd/system/containerd.service.d/20-limitnofile.conf
--BOUNDARY-- and drain all new nodes from cluster |
@mmerkes Can you please update us when the AMI is ready for usage? |
☝️ adding to that, an ETA would much appreciated as well. Is it in the magnitude of hours or days? |
I'm using this setup for now in karpenter userData. Bumping soft limit from 1024 to 102400 Adding this to our bootstrap for now to 10x the soft limit.
|
If anyone needs, we fixed it in Karpenter by hardcoding the older AMI in
|
A go runtime change in 1.19 automatically maxes-out the process’ NOFILE limit, so I would expect to see this problem with go binaries on earlier versions: golang/go#46279 Has anyone run into this problem with a workload that isn’t a go program? |
We are working on releasing a new set of AMIs ASAP. I will post another update in 3-5 hours on the status. We should have a better idea then. |
People have mentioned running into this problem on envoy proxy, which is a C++ program. |
Yes, I've been looking into that. Envoy doesn't seem to bump its own soft limit, and it also seems to crash hard when the limit is hit (on purpose): aws/aws-app-mesh-roadmap#181 Other things I've noticed:
|
The EKS provided SSM Parameter to reference to the current EKS AMI has been reverted to reference the last good AMI in all regions globally. This will automatically resolve the issue for Karpenter and Managed node group users and any other systems that determine the latest EKS AMI from the SSM Parameter. We will provide another update by December 29 at 5:00 PM with a deployment timeline for new AMIs. |
It'd be ideal to identify what software is not compatible and actually getting that addressed, but I understand the need to revert for the time being. So long as you avoid
If you need to set an explicit limit (presumably because defaults are not sufficient), and the advised That still won't be sufficient for some software as mentioned, but that is software that should know better and handle it's resource needs properly, exhausting the FD limit is per-process, so it's not necessarily an OOM event. The system-wide FD limit is much higher (based on memory IIRC).
Envoy requires a large number of FDs, they have expressed that they're not interested in raising the soft limit internally and that admins should instead set a high enough soft limit. I've since opened a feature request to justify why Envoy should raise the soft limit rather than defer that to be externally set high where it can negatively impact other software. References:
For For Java, related to the systemd v240 release notes, there was this github comment at the time about Java's memory allocation. With the While you cite 20 years, note that the hard-limit has incremented over time.
This was all (excluding Envoy) part of my original research into moving the Systemd has it right AFAIK, sane soft and hard limits. For AWS deployments some may need a higher hard limit, but it's a worry when software like Envoy doesn't document anything about that requirement and advises the stance of raising the soft limit externally. |
We were using karpenter which again is an AWS backed tool and it started picking up the new AMI dynamically as we started facing issues. The root cause: #1535 |
v20231220
v20231220
As an update to the previous announcement, we are tracking for a new release by January 4th. |
@ndbaker1 is this file descriptor limit change expected to be reintroduced to that release? Or will that still be excluded? Just wondering if we need to pin our AMI version until we implement our own fix for istio/envoy workloads or something is implemented in envoy itself to handle that change better |
@Collin3 that change has been reverted and will not be in the next AMI release 👍 |
This is resolved in the latest release: https://github.com/awslabs/amazon-eks-ami/releases/tag/v20231230 |
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 <[email protected]>
What happened:
Customers are reporting hitting ulimits as a result of this PR #1535
What you expected to happen:
How to reproduce it (as minimally and precisely as possible):
Anything else we need to know?:
Environment:
aws eks describe-cluster --name <name> --query cluster.platformVersion
):aws eks describe-cluster --name <name> --query cluster.version
):uname -a
):cat /etc/eks/release
on a node):The text was updated successfully, but these errors were encountered: