itzg / docker-minecraft-bedrock-server

Containerized Minecraft Bedrock Dedicated Server with selectable version
MIT License
1.14k stars 218 forks source link

Too many open files on M2 Mac #426

Open dirkjankrijnders opened 3 months ago

dirkjankrijnders commented 3 months ago

Hi,

I have been running a bedrock server on my Mac mini m2 for the last couple of weeks without problems. However since this morning I'm getting the error below in a loop. I have already played with ulimits, but that did not help. As far as I know nothing was upgraded. This is with an empty data folder (though I tried with the world that was working yesterday with the same result).

2024-06-23 19:57:41 DEBU[0000] Using /data to match uid and gid             
2024-06-23 19:57:41 DEBU[0000] Resolved UID=0 from match path               
2024-06-23 19:57:41 DEBU[0000] Resolved GID=0 from match path               
2024-06-23 19:57:41 Looking up latest version...
2024-06-23 19:57:41 /opt/bedrock-entry.sh: line 18: restify.err: Too many open files
2024-06-23 19:57:42 /opt/bedrock-entry.sh: line 18: restify.err: Too many open files
2024-06-23 19:57:43 /opt/bedrock-entry.sh: line 18: restify.err: Too many open files

Below is my docker-compose.yml:

# This example uses a host mounted directory that is created/used relative to this
# location of this compose file.

version: "3.4"

services:
  bds:
    image: itzg/minecraft-bedrock-server:latest
    restart: always
    environment:
      EULA: "TRUE"
      GAMEMODE: survival
      OPS: 2535457066320443
      DIFFICULTY: hard
    ports:
      - 19132:19132/udp
    volumes:
      - /Users/dirkjan/Projects/Own/bedrock/data:/data
    stdin_open: true
    tty: true
    ulimits:
      nofile:
        soft: 50000
        hard: 80000
itzg commented 3 months ago

That's a system level issue

https://www.howtogeek.com/805629/too-many-open-files-linux/