Gamelift ProcessEnding and Destroy via suggested sample, but reported SERVER_PROCESS_PROCESS_EXIT_TIMEOUT

0

https://docs.aws.amazon.com/gamelift/latest/developerguide/integration-server-sdk5-csharp-actions.html#integration-server-sdk5-csharp-processending

We use unity dedicated server(2021.3.10f1) and sdk C#(5.1.1), managed fleet with linux.

We got dedicated server issue, started remote monitoring with ssm. And tail whitewater/Logs/processmanager.log

Case 1, use sample. reported SERVER_PROCESS_PROCESS_EXIT_TIMEOUT.

GenericOutcome processEndingOutcome = GameLiftServerAPI.ProcessEnding();
GameLiftServerAPI.Destroy();

if (processEndingOutcome.Success)
  {
    Environment.Exit(0);
  }
else
  {
    Console.WriteLine("ProcessEnding() failed. Error: " + processEndingOutcome.Error.ToString());
    Environment.Exit(-1);  
  }
ProcessExitHelper: Determining exit from processExitValue 137; terminationReason
ProcessExitHelper: Creating abnormal exit from exitCode FORCE_EXIT_EXIT_TIMEOUT
EventReporter: Reporting exit ProcessExit(exitType=ABNORMAL, exitCode=FORCE_EXIT_EXIT_TIMEOUT) with exit code 137 for process [`process_uuid`] 
EventReporter: Did not find an abnormal exit, but FORCE_EXIT_EXIT_TIMEOUT exit code. must report
....
HeartbeatHandler: Received Heartbeat response with Status: [Active]; Unhealthy processes: [[`process_uuid`]]; Unregistered processes: [[]]
GameProcessManager: Skipping process termination; no managed process found with process UUID `process_uuid`

Case 2, use sample line of only ProcessEnding. but not reported SERVER_PROCESS_PROCESS_EXIT_TIMEOUT.

GenericOutcome processEndingOutcome = GameLiftServerAPI.ProcessEnding();
ProcessExitHelper: Determining exit from processExitValue 0; terminationReason null
EventReporter: Reporting exit ProcessExit(exitType=NORMAL, exitCode=NONE) with exit code 0 for process [`process_uuid`]
EventReporter: Did not find an abnormal exit.  Not recording an event.
...
HeartbeatHandler: Received Heartbeat response with Status: [Active]; Unhealthy processes: [[`process_uuid`]] Unregistered processes: [[]]
GameProcessManager: Skipping process termination; no managed process found with process UUID `process_uuid`

Which one is normal? what does HeartbeatHandler Unhealthy processes list mean?

As an aside, the server would sometimes restart and show SERVER_PROCESS_EXIT_TIMEOUT when I wasn't playing.

asked 3 months ago163 views
1 Answer
0

Hello,

Kindly note that the correct steps to terminate the process is to call the ProcessEnding(), Destroy(), and exit(0) (in that exact order). It is important to note that if this isn't done within 1 minute, a SERVER_PROCESS_EXIT_TIMEOUT Fleet event will be created when GameLift terminates the process for you.

If you are terminating the process correctly and if you are still facing “SERVER_PROCESS_EXIT_TIMEOUT” issue, we would require further details from your end which are non-public information like your Fleet ARN, additional logs in order to investigate this issue further. Hence, kindly open a support case with AWS Premium Support so that we can further investigate this issue.

[+] AWS Premium Support: https://aws.amazon.com/premiumsupport/

AWS
SUPPORT ENGINEER
answered 3 months ago
profile picture
EXPERT
reviewed 25 days ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions