docker-palworld-dedicated-server
docker-palworld-dedicated-server copied to clipboard
[Feature Request] Auto-restart
Have you read the Important information text above
- [X] Yes i did
Describe the feature
This game server has a giant memory leak that all my server memory is occupied, so I need to restart server like every 3-4 hours. So can we support this auto-restart feature to keep server running stably?
Additional information
- [ ] Would you be willing to help implement this feature?
Final checks
- [X] I understand that this is a feature request function. I also unterstand that if i use this to report a bug report, that my issue might be un-answered closed.
You can try adding a line to crontab like
0 0,6,12,18 * * * docker compose -f <your compose file location> restart
This command makes it restart at 6am/pm and 12am/pm. Use a crontab generator(https://crontab.guru/) to figure out your frequency
Here's some a gist of a shell script that does it and announces it via RCON: https://gist.github.com/Bluefissure/b0fcb05c024ee60cad4e23eb55463062
Here's some a gist of a shell script that does it and announces it via RCON: https://gist.github.com/Bluefissure/b0fcb05c024ee60cad4e23eb55463062
That shell-script is very interesting, thanks for sharing that! ❤️ 👍
Here's some a gist of a shell script that does it and announces it via RCON: https://gist.github.com/Bluefissure/b0fcb05c024ee60cad4e23eb55463062
It's a much needed, helpful solution.
@jammsen hi jammsen, I Inspired by this thread, I wrote the some code.
Actually, I'm not very experienced with dockers. so how did I make a separate repo, I hope this will help
https://github.com/doodoori2/palworld-admin-bashscripts
@jammsen hi jammsen, I Inspired by this thread, I wrote the some code.
Actually, I'm not very experienced with dockers. so how did I make a separate repo, I hope this will help
https://github.com/doodoori2/palworld-admin-bashscripts
I might add something similar too down the line, as you can see we have very creative FR open in here.
Any updates?
For those interested, you can use the following configuration in docker-compose. I added a limit on the ram usage to auto kill the container if too much ram is used, then always restart the container
version: '3.9'
services:
palworld-dedicated-server:
#build: .
container_name: palworld-dedicated-server
image: jammsen/palworld-dedicated-server:latest
restart: unless-stopped
deploy:
resources:
limits:
memory: 11gb
restart_policy:
condition: any
ports:
- target: 8211 # Gamerserver port inside of the container
published: 8211 # Gamerserver port on your host
protocol: udp
mode: host
- target: 25575 # RCON port inside of the container
published: 25575 # RCON port on your host
protocol: tcp
mode: host
env_file:
- ./default.env
volumes:
- ./game:/palworld
Any updates?
@thejcpalma is working on a solution, Soon ™
Yes! xD Will implement auto restart, but with some protections so will be a change in the next PR, stay tuned ✨😊
Feature
Restart the server process to avoid memory leaks and reduce resource usage. Objectively to use in other scenarios like auto-restart, server auto-update, backup restore... Avoid container restart, just process restart.
Looking at this for reference on some things:
- https://github.com/doodoori2/palworld-admin-bashscripts
Feature is implemented, pending https://github.com/jammsen/docker-palworld-dedicated-server/pull/179
This is fix in the release on latest from 5 minutes ago. See Changelogs or Discord message regarding the new release and what to lookout for.
Im closing this issue as resolved, feel free to reach out again if you need help.
If you like this project, please consider giving this repo and the Docker-Hub-Repo a Star.