From 379068de8cfc18cced96a9c59ff5424c69fc3ea0 Mon Sep 17 00:00:00 2001 From: Mike Burke Date: Sun, 24 Nov 2024 19:15:42 +0000 Subject: [PATCH] Fix for: WRN The open files limit is too low (1024) and may cause crashes. (#280) Recommended is at least 10240. More info: https://community.7daystodie.com/topic/3998-support-faq-information-and-common-solutions/?do=findComment&comment=48438 --- Dockerfile | 3 +++ docs/usage.md | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/Dockerfile b/Dockerfile index 9b66ce9..4321958 100644 --- a/Dockerfile +++ b/Dockerfile @@ -94,6 +94,9 @@ RUN deluser --remove-home ubuntu RUN adduser --home /home/sdtdserver --disabled-password --shell /bin/bash --disabled-login --gecos "" sdtdserver \ && chown -R sdtdserver:sdtdserver /home/sdtdserver +#Set ulimit as recommended by the game. +RUN echo 'sdtdserver soft nofile 10240' >> /etc/security/limits.conf + ##Need use xterm for LinuxGSM## ENV PUID=1000 PGID=1000 \ START_MODE=0 \ diff --git a/docs/usage.md b/docs/usage.md index 7ae62ba..e82cd72 100644 --- a/docs/usage.md +++ b/docs/usage.md @@ -49,5 +49,10 @@ services: - 8080:8080/tcp # OPTIONAL - WEBADMIN - 8081:8081/tcp # OPTIONAL - TELNET - 8082:8082/tcp # OPTIONAL - WEBSERVER https://7dtd.illy.bz/wiki/Server%20fixes + ulimits: + nofile: + soft: "10240" + hard: "10240" + restart: unless-stopped # INFO - NEVER USE WITH START_MODE=4 or START_MODE=0 ```