Closed pauljako closed 2 weeks ago
Hey, does this bug appear immediately after starting, or does it take time to appear? I have tested your docker image on my machine and it only uses about 0.09% of my CPU.
Odd... for me it happens directly after starting
Can you try to update your CraftsNet version to 3.3.1-SNAPSHOT?
Can you try to update your CraftsNet version to 3.3.1-SNAPSHOT?
The Issue is still there
Is a client connected or does this also occur without a client connection?
There is no Client connected right now
Can you show me a screenshot of htop in the tree view (toggle with F5)
Does this also occur if you do not load your addon? (You can disable the addon system with --disableAddonSystem or just remove the addon jar)
I forgot that if you deactivate the addon, you have to append --forceWebSocketServer --forceWebServer
so that the servers are still started.
I have a possible solution for your issue. Please try upgrading to the experimental version 3.3.1-pre3 which should fix your issue. If you want to use experimental versions of CraftsNet you have to add the repo maven { url "https://repo.craftsblock.de/experimental" }
(this is the notation for the gradle dsl) to your repositories.
You can find a runnable version of the jar at https://repo.craftsblock.de/#/experimental.
Unfortunately, this doesn't change anything.
But I did some testing and found out that this issue appears to be docker-compose related?
Executing docker run --rm -it pauljako/airserver
does not cause this issue
Here's my compose file:
services:
airserver:
container_name: airserver
restart: unless-stopped
ports:
- 3400:5000
- 3401:5001
image: pauljako/airserver
volumes:
- ./airserver-data:/data/addons/AirServer
Strange, that's probably why I didn't have this bug, because I had tested it via docker. I'll definitely take a closer look at this again with docker-compose. Until then, I would recommend running it via a normal docker container.
I was able to reproduce the bug using docker compose and found the error after some research. The problem occurred in the console reader, which somehow went crazy when executed by docker compose and looped every millisecond.
You can update to 3.3.1-pre4
so that you can use docker compose again until the next latest version comes out. (You will still need the experimental repo from craftsblock for this.) You can download a runnable jar for CraftsNet here (https://cloud.craftsblock.de/s/craftsnet/download/CraftsNet.jar). (You can also use the link in your Dockerfile).
@pauljako has this fix solved the issue for you?
Yes this fixed it. Thank you very much
Describe the bug When running my Cosmetic Server, CrafstNet is using 100% of CPU usage. And other containers on my VPS get slow
To Reproduce Steps to reproduce the behavior:
Expected behavior Only the CPU power that is needed should be used
Version