如何解决错误:警告为进程配置的低打开文件描述符限制当前值:4096,推荐值:10000
我正在尝试在 AWS Fargate 中放置一个容器,收到错误“为进程配置的 WARN 低打开文件描述符限制。当前值:4096,推荐值:10000。--错误:输入(“错误打开规范文件: 没有这样的文件或目录(操作系统错误 2)") "
谁能帮我解决这个问题
Docker 文件:
FROM ubuntu:16.04
RUN apt-get -y update
RUN DEBIAN_FRONTEND="noninteractive" apt-get -y install tzdata
RUN apt install -y cmake pkg-config libssl-dev git build-essential clang libclang-dev curl
RUN curl https://sh.rustup.rs -sSf | bash -s -- -y
ENV PATH="/root/.cargo/bin:${PATH}"
RUN rustup toolchain install nightly-2020-09-28 && rustup default nightly-2020-09-28 && rustup override
set nightly-2020-09-28
COPY ./polkadex-aura-node/ /polkadex-aura-node/
RUN cd /polkadex-aura-node && cargo build --release
RUN cd /polkadex-aura-node/scripts/ && ./createCustomSpec.sh
RUN echo "fs.file-max = 100000" >> /etc/sysctl.conf
RUN ulimit -n 90000
RUN echo "* soft nofile 65535" >> /etc/security/limits.conf
RUN echo "* hard nofile 65535" >> /etc/security/limits.conf
尝试了最后四行来解决问题,但没有奏效。
解决方法
将以下配置添加到您的 systemd 服务中:
LimitNOFILE=10000
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。