Download

Dedicated Server Won't Run in Shipping Mode

Hi everyone,

I’ve got a really baffling problem that I don’t even know how to start debugging. I am running 4.24.3 using a source build of the engine (unmodified, with some plugins).

If I package my dedicated server in shipping mode (Windows or Linux, doesn’t matter), then when the server is run it just creates a dead process that uses 0% CPU and around 200mb of memory. No log file is generated, though if I run with bUseLoggingInShipping = true and run with the -log parameter then I get a tiny bit of output, this is it in its entirety:


CAppInfoCacheReadFromDiskThread took 81 milliseconds to initialize [S_API]
SteamAPI_Init(): Loaded local 'steamclient.so' OK.
Failed to set thread priority: per-thread setup failed
Failed to set thread priority: per-thread setup failed
RecordSteamInterfaceCreation (PID 4739): SteamGameServer012 / GameServer RecordSteamInterfaceCreation (PID 4739): SteamUtils009 / Utils RecordSteamInterfaceCreation (PID 4739): SteamUtils009 

After that the process is dead, the lights are on but nobody is home.

If I package the server in development mode, then the server will randomly hang after a few hours. The server continues to show up in the server browser, it will refresh the ping when queried, but will produce a connection timeout error when attempting to connect, and it stops producing log output completely. This seems to happen suddenly and there is no error or warning, it’s like the process was just put on pause suddenly.

I have tried running the server in debug mode and so far it has been running smoothly for 6 hours. In my Project Launcher configurations all 3 modes (debug, development and shipping) are all identical except the Build Config and Cooker Build Config, which are set to the appropriate setting.

Note that my client does not have this problem, in works flawlessly in shipping mode.

Can anyone help me start to even debug this problem and understand what is going on? I can’t think why my server would work fine in debug, but have problems in development and/or shipping. As far as I am aware, my game module has no code specifically targeting shipping or development modes.

Thanks!

When the server breaks, are you at 48 hours? there is a line of code that checks for 48 hours of use and you really need to restart the server before the 48 hours runs out.
Here is the line of code i am talking about



// Force an old style load screen if the server has been up for a long time so that TimeSeconds doesn't overflow and break everything
bool bSeamless = (bUseSeamlessTravel && GetWorld()->TimeSeconds < 172800.0f); // 172800 seconds == 48 hours


It was the same in udk if we compiled in shipping mode could not run a dedicated server or use the console. In development mode, We could run the dedicated server and use the console fine. Sounds like same issue is still there.

Nope, this happens at start up in shipping mode. Server never actually starts (it doesn’t even generate a log file!), it just runs a dead process that does nothing. In development mode, the hanging tends to happen within 4-6 hours or so of use, it never gets anywhere near 48 hours.

A quick update. I tried attaching the Visual Studio debugger to the running process, and it’s completely dead. There is nothing running as far as I can see. No stack trace, nothing. Is anyone able to help identify this issue? I’m really stuck and it will hurt our game when our servers randomly hang up after a few hours, and we have to release debug or development versions of our software because the proper production versions don’t work.

I have been through the code, we don’t have a single while loop that could potentially get stuck. There is no output in the logs that can help, it is just the usual log output that occurs during gameplay and then all of a sudden it just stops and nothing more is output.