UE4 GameLift Server crashes and/or terminates after fleet state activating. What should I do?

Hi all,

I’m trying to get my server to work with GameLift but as the title says, it keeps on crashing as soon as the fleet activates it. I’m using this exact code to star the server:

https://docs.aws.amazon.com/gamelift/latest/developerguide/integration-engines-setup-unreal.html

I’ve also tested my server and my client, using the same code as the uploaded build, using GameLiftLocal and it works fine. The server never crashes and I consistently see “Health status: healthy”.

So the only difference between my GameLift server code and the sample given to us by amazon is that I don’t have mine in the game instance class. I’ve set GameLift up to work through an OnlineSession interface. Which is not a class that is derived from a UObject, maybe there’s some significance there but I’m not sure.

Something else to note is that I’ve tried initializing the GameLift server code in two different areas of the startup process. They both worked for GameLiftLocal, but neither worked for regular GameLift. But they did produce different errors. When I initialized the GameLift server when the OnlineSubsystem was initialized (before begin play stuff) I was getting a Timeout error for my server. So 3 minutes after the fleet activated I would get PROCESS_TERMINATED_UNHEALTHY (basically). But when I initialized the GameLift server in a FOnlineSession function called CreateSession(…) (or after begin play stuff) I get this error SERVER_PROCESS_CRASHED. Which makes it so the fleet doesn’t even fully activate. So I’m pretty dumbfounded at this point.

Also I’ve tried doing window remote access but I couldn’t get it to work (and there’s not really any good documentation on it). And I’ve done the thing where you only allow one server process to happen, and turned off fleet scaling. I’ve also made a simpler UE4 & GameLift implementation that worked locally and over the internet, but it was using game instance class. But the server code was identical.

I’ve been working on this for awhile, I’d appreciate any help I can get. Thanks.

Here’s the crashed server fleet ID: fleet-161c83b7-8800-4e3a-8f7a-cd04dc05c0f2

And region: us-west-2

Best way to figure it out is to remotly acess the server instance.