mbround18 / valheim-docker

Valheim Docker powered by Odin. The Valheim dedicated gameserver manager which is designed with resiliency in mind by providing automatic updates, world backup support, and a user friendly cli interface.
https://hub.docker.com/r/mbround18/valheim
BSD 3-Clause "New" or "Revised" License
767 stars 82 forks source link

Server starting up really slowly #903

Closed lucrenauld closed 1 month ago

lucrenauld commented 3 months ago

Hello there,

symptom : Server takes at least 60 minutes to start now. Stucking during Chainloader startup.

Tasks before incident : After a severe situation in game, I tried to copy my save locally to do a bit of cheating commands on it. After that I uploaded the new saves files (db and fwl) on server.

Things tried by myself : Update to 3.0.3 of valheim server. Roll back to old saves before copy. Restart server and host. Switched type from BepInExFull to BepInEx

Other things : I still can see the odin start process in my container. And my ciontainer doesn't log anymore after these lines :

[ODIN][INFO]: [valheim_server.log]: 07/28/2024 16:57:35: Starting to load scene:start.unity (169d7618616154c03be07e9ad3af5893)
[ODIN][INFO]: [valheim_server.log]: 07/28/2024 16:57:35: Set background loading budget to Normal
[ODIN][INFO]: [valheim_server.log]: 07/28/2024 16:57:39: Set background loading budget to High

Wait one hour

[ODIN][INFO]: [valheim_server.log]: Couldn't create a Convex Mesh from source mesh "default" within the maximum polygons limit (256). The partial hull will be used. Consider simplifying your mesh.
[ODIN][INFO]: [valheim_server.log]: The referenced script on this Behaviour (Game Object '<null>') is missing!
[ODIN][INFO]: [valheim_server.log]: The referenced script on this Behaviour (Game Object '<null>') is missing!
[ODIN][INFO]: [valheim_server.log]: Couldn't create a Convex Mesh from source mesh "default" within the maximum polygons limit (256). The partial hull will be used. Consider simplifying your mesh.
[ODIN][INFO]: [valheim_server.log]: [Message:   BepInEx] Chainloader startup complete

Versions :

Files :

mbround18 commented 2 months ago

maybe the mod is slow? i know it takes a bit to start up

lucrenauld commented 2 months ago

For me it's related to odin. Is there a way to preconfigure some things on Odin to make it start a bit faster ?

mbround18 commented 2 months ago

odin runs in sub 200ms and its runtime is only 4mb what are you seeing thats slow? thats why its built in rust vs something like python.

Odin Info with Log Name is just a log parser which watches logs for changes using inotify then logging them to stdout/stderr due to there being ~6 logs or so.

That waiting 1hr between log outputs, are you able to see if the log is generated before odin logs it out? that could be an odin issue vs mod issue and id be curious to see

lucrenauld commented 2 months ago

I don't know how I could verify it. I'm just reading docker container logs which are copied un valheim server log file.

mbround18 commented 2 months ago

docker compose exec valheim tail -f /home/steam/valheim/logs/*

and monitor odins log output as well

see if the logs appear at the same time

lucrenauld commented 2 months ago

I don't have more logs during the process tailing all logs on startup. Maybe setting up DEBUG_MODE to 1 as shown here could help ? Do I have to set it in the environment vars in docker compose ?

mbround18 commented 2 months ago

if you set that in your compose it will be very verbose and is an excellent debug tool

lucrenauld commented 2 months ago

I don't get more logs with this option enabled

mbround18 commented 2 months ago

what processor are you running on?

lucrenauld commented 2 months ago

Running on one single core of a AMD EPYC 7543P 32-Core Processor.