- Newest
- Most votes
- Most comments
Were you able to view that fleet? Any thoughts or insights are appreciated.
So this will sound bad...but I don't actually have access to a Linux environment to try it locally (relying on the beautiful cross platform dream of Unity). However, I have run a Windows version of my server and verified its error code (cmd %errorlevel%) to be 0. That wasn't running GameLift local though. I'll try that as soon as I get a moment.
I'm definitely supposed to be calling the GameLift Destroy API before I exit, right?
Hi @REDACTEDUSER
Process shutdown with exit code: 137
Can you try shutting down locally to see if you're getting the same exit code?
Thanks,
Ben
Hey there. Finally got a chance to run my server against GameLift Local again. It's under Windows and not Linux like I'm running in live but still interesting. It looks like GameLift Local is actually throw exceptions...and in doing so possibly preventing my server process from ending? Any thoughts?
7505-gamelift-local-log.txt|attachment (17.8 KB)gamelift-local-log.txt
Hi @REDACTEDUSER
I'm looking into this now and hope to have an answer for you soon.
Has this been resolved? I've updated to the latest server SDK for .NET 4.5 but I'm running into the same issue.
I'm seeing this issue about every 5 minutes in the event logs.. Is this something others are seeing? I've run my game server locally on windows without issues for multiple hours so I'm not sure why that would be happening...
If you are calling ProcessEnding and then calling Destroy there appears to be a race condition that can cause your process to be incorrectly marked as crashed.
Short term fix is to avoid that call to Destroy. A fix is in the works, but no ETA at this time.
Hi, I have same issue and avoiding calling Destroy doesn't help me. My server process log says ProcessEnding() is succssfully called but fleet event log shows "Server process exited without calling ProcessEnding(), exitCode(137)". In local gamelift, exit code is 0. Is there any solution for this?
(Unity 2019.1, GameLift Server SDK 3.3.0.)
I found the example in Unity says to call:
void OnApplicationQuit() { // Make sure to call GameLiftServerAPI.Destroy() when the application quits, // this resets the local connection with GameLift's agent. if(!m_ProcessEnding) GameLiftServerAPI.Destroy(); }
If you just remove this bit of code, seems to terminate without errors
On second review, still did not end cleanly...
I found this was an issue with the build not exiting without errors (my bad), then after you have called, and got an ok from:
GameLiftServerAPI.ProcessEnding();
In Unity you need to call:
Application.Quit();
Failure to do this may result in both a SERVER_PROCESS_FORCE_TERMINATED Server process did not cleanly exit within 30 seconds of OnProcessTerminate()
or a SERVER_PROCESS_TERMINATED_UNHEALTHY Server process exceeded 3 minutes without reporting healthy
message
Thanks for the updates. Both your posts are correct:
-
Destroy is deprecated but it looks like it lingers in the documentation: https://docs.aws.amazon.com/code-samples/latest/catalog/dotnet_legacy-GameLift-GameLift-Unity-game-server.cs.html and https://docs.aws.amazon.com/gamelift/latest/developerguide/integration-engines-unity-using.html
- Will file an issue on that
- If you know about other places then let me know
-
The documentation again is a little unclear in the samples, but the expectation is you call ProcessEnding (I would log the response) and then the application should exit asap.
- Documentation is again unclear on this in some places.
Thanks for the update.
Relevant content
- asked 3 months ago
- AWS OFFICIALUpdated 2 months ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 8 months ago
- AWS OFFICIALUpdated a year ago