itzg / itzg/docker-minecraft-bedrock-server

Too many open files on M2 Mac

Open
#426 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

discussion
Dominant language
Shell
Stars
1.9k
Forks
303
Avg merge
2h 26m
Merged PRs (30d)
2

Description

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by inspecting /opt/bedrock-entry.sh at line 18 and reproduce the failure with the supplied docker-compose.yml, including its nofile limits and /data mount. Trace why the repeated “Too many open files” error occurs during “Looking up latest version.” Done means the cause is identified and the server starts without the repeated error under the reported setup.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, docker-compose, macos, shell
Domain
devops, infrastructure
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.