Skip to content

SERVER_PROCESS_PROCESS_EXIT_TIMEOUT

0

Hello, I've been struggling with this warning/error for some time now. After each match, I want to destroy the game session so that it becomes available for the next players who want to start a server. However, each time a server is destroyed using ProcessEnding(), the following error/warning is thrown:

'SERVER_PROCESS_PROCESS_EXIT_TIMEOUT - Server process failed to cleanly exit after ProcessEnding().'

Why is this happening? I haven't been able to figure it out for a while, and I want to resolve this issue.

When I destroy the game sessions, there are no active player sessions on the server. I've added logs after each event to track what’s happening, and as you can see in the logs, there are no active players. However, if I terminate the game session manually from the game session tab (using the second option), the server is destroyed without any errors.

[2025.03.01-16.13.26:645][161]LogAwsGameLiftServer: Verbose: [RemovePlayerSession] [2025.03.01-16.13.26:701][161]LogBlueprintUserMessages: [BP_MasterPS_C_2147482321] Player session removed successfully [PS] [2025.03.01-16.13.26:701][161]LogBlueprintUserMessages: [BP_MasterGM_C_2147482456] Count remaining players [GM] [2025.03.01-16.13.26:701][161]LogBlueprintUserMessages: [BP_MasterGM_C_2147482456] Server is scheduled to destroy [2025.03.01-16.13.26:701][161]LogBlueprintUserMessages: [BP_MasterGM_C_2147482456] No more players on the server [GM] [2025.03.01-16.14.05:681][328]LogAwsGameLiftServer: Verbose: [operator()] [2025.03.01-16.14.05:681][328]LogAwsGameLiftServer: Verbose: [ServerHealthCheck_Implementation] [2025.03.01-16.14.05:681][328]LogBlueprintUserMessages: [None] Health check [Server Object]: true [2025.03.01-16.14.26:648][956]LogAwsGameLiftServer: Verbose: [ProcessEnding] [2025.03.01-16.14.27:008][956]LogBlueprintUserMessages: [BP_MasterGM_C_2147482456] Server destroyed

Thank you!

asked a year ago95 views
1 Answer
2

The SERVER_PROCESS_PROCESS_EXIT_TIMEOUT error you're experiencing is likely due to the server process not exiting cleanly within the expected time frame after calling ProcessEnding(). This can happen for a few reasons:

  1. The server might be taking too long to shut down completely. GameLift expects the process to exit within 30 seconds after calling ProcessEnding().

  2. There might be some lingering tasks or operations that are preventing the server from shutting down promptly.

  3. The Destroy() method might not be called immediately after ProcessEnding(), which is necessary for a clean shutdown.

To resolve this issue, try the following:

  1. Ensure you're calling ProcessEnding(), then Destroy(), and finally exiting the process, in that exact order. This sequence is crucial for a clean shutdown.

  2. Check if there are any long-running tasks or operations that might be delaying the shutdown process. Try to complete or terminate these before calling ProcessEnding().

  3. Implement a timeout mechanism in your shutdown process. If the server doesn't exit within a certain timeframe (less than 30 seconds), force it to terminate.

  4. Add more detailed logging around the shutdown process to identify any potential bottlenecks or issues preventing a clean exit.

  5. If possible, profile your shutdown process to see where it might be getting stuck or taking too long.

If you've implemented these suggestions and are still facing issues, it might be worth opening a support case with AWS Premium Support for a more in-depth investigation, as they would have access to more detailed logs and information about your specific setup.
Sources
Event - Amazon GameLift
Gamelift ProcessEnding and Destroy via suggested sample, but reported SERVER_PROCESS_PROCESS_EXIT_TIMEOUT | AWS re:Post

answered a year ago
EXPERT
reviewed a year 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.