Skip to content
This repository has been archived by the owner on May 14, 2024. It is now read-only.

[Bug]: Dont Starve Together #2651

Open
KenRen98 opened this issue Jan 7, 2024 · 5 comments
Open

[Bug]: Dont Starve Together #2651

KenRen98 opened this issue Jan 7, 2024 · 5 comments
Labels
bug Something isn't working not confirmed bug has not been reproduced or confirmed

Comments

@KenRen98
Copy link
Contributor

KenRen98 commented Jan 7, 2024

Panel Version

1.11.4.0

Wings Version

1.11.8.0

Service

second shard

Modified

No, I did not modify the egg

Expected Behavior

main process and co process run normally. so two shards would run in one docker image.

Actual Behavior

co process dies/pauses when mod is added ( this is a preexisting problem in this egg for long time, and appear to be version irrelevant ), no matter if which ( master or cave ) is in co process, only main process lives after few seconds.

Steps To Reproduce

Add some mods (maybe more than 4 or 5) to the server that's going to be run on co process, after few seconds, the CPU utilization will drop and if you check server.log, it will stop at random places. (But when shutting down, some lines might get added at bottom of the file)

I checked many things and it appears to be not the problem of the game itself, if you swap master/cave server in run command, the one in main process will always run properly, co process dies. (also tried swapping world setting from normal to cave world, no difference)

suspected reason: Docker issue, co process command is not running properly in Docker.

@gOOvER @parkervcp @QuintenQVD0
Tested Solution (if the approach is acceptable, I will do pull request in yolks and eggs):

  1. Added Supervisord in source image build
    https://github.com/KenRen98/yolks/blob/194069609907bc96fcf122f6103fe1b839782f0d/games/source/Dockerfile

  2. Added Supervisord configuration to run two processes (this will be in eggs, just for convenience I put it there)
    https://github.com/KenRen98/yolks/blob/194069609907bc96fcf122f6103fe1b839782f0d/games/source/supervisord.conf

  3. New startup command to run the Supervisord with the config
    supervisord -c ./supervisord.conf & sleep 5 && supervisorctl -c ./supervisord.conf fg master

  4. Termination command remain the same
    Cave will turn off when master turns off, just no output for user ( Supervisorctl is not exiting forground mode automatically )
    So there will be about 10-60 seconds waiting cave to exit without any output.

  5. Below is the new egg that I tested , you can test it too.
    Please use this image: docker.io/kenren98/games:source

egg-don-t-starve-together---n-e-w.json

Install logs

https://pteropaste.com/44g3h2mv0yf8

@KenRen98 KenRen98 added bug Something isn't working not confirmed bug has not been reproduced or confirmed labels Jan 7, 2024
@KenRen98
Copy link
Contributor Author

KenRen98 commented Jan 8, 2024

In case who needs to test it, below is a pair of tested config files for DST, GitHub does not support lua upload, please change file name yourslef. This would reproduce the problem, and show my solution works. Please also note that these would not cause any runtime errors for the server (no compatibility issue)

modoverrides.txt
dedicated_server_mods_setup.txt

@parkervcp
Copy link
Collaborator

@KenRen98 You can PR your changes to the yolks and eggs repos

@KenRen98
Copy link
Contributor Author

@KenRen98 You can PR your changes to the yolks and eggs repos

I have created PR request for both of eggs and yolks.
Currently I haven't find a good solution to shutdown both Master and Caves automaticly, I will leave that to you guys.

In yolk PR, I have posted some methods I have tried to fix that, but non of them worked.

Thanks for replying and giving attention to this outdated game anyway. lol

@parkervcp
Copy link
Collaborator

I am sure we can get modded servers to run without supervisord

@KenRen98
Copy link
Contributor Author

I am sure we can get modded servers to run without supervisord

Well, more than happy to see.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working not confirmed bug has not been reproduced or confirmed
Projects
None yet
Development

No branches or pull requests

2 participants