【问题标题】:Error : WARN Low open file descriptor limit configured for the process. Current value: 4096, recommended value: 10000错误:WARN 为进程配置的低打开文件描述符限制。当前值:4096,推荐值:10000
【发布时间】:2021-03-07 04:53:51
【问题描述】:

我试图在 AWS Fargate 中放置一个容器,收到错误“WARN Low open file descriptor limit configured for the process。当前值:4096,推荐值:10000。--错误:输入(“打开规范文件时出错: 没有这样的文件或目录 (os error 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

尝试了最后四行来解决问题,但没有成功。

【问题讨论】:

    标签: docker dockerfile aws-fargate


    【解决方案1】:

    将以下配置添加到您的 systemd 服务:

    限制NOFILE=10000

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2021-05-23
      • 2020-04-11
      • 1970-01-01
      • 1970-01-01
      • 2017-09-25
      • 1970-01-01
      • 2022-08-15
      相关资源
      最近更新 更多