Unity server built with IL2CPP fails

Has anyone here had any luck running a Linux server build, created from Unity using IL2CPP?

I currently have a mono-based build working great, but I was hoping to increase CPU performance by using IL2CPP instead. Such an increase, I hypothesize, would allow me to squeeze more concurrent game sessions on each ec2.

But, no luck. While the fleet does eventually become active, it struggles for a while, throwing events like “Server process exceeded 3 minutes without reporting healthy,” and “SERVER_PROCESS_CRASHED: Server process exited without calling ProcessEnding()”. Eventually, the Fleet will go to Active, but if I try to connect to it from the client-side, I just get radio silence.

I tried to investigate what was going on by running GameLift Local on my personal Linux VM, but I’m not seeing anything interesting in my app logs. It just looks like it’s booting up as intended.

I’m wondering if any of you have come across anything like this before, or if any of you have been able to get IL2CPP working server-side.

Hi TheoTowers,

  1. Are you using the latest GameLift Server SDK version?
  2. If the fleet was able to go Active, that means: 1) your server process was able to start, 2) your server process was able to call the SDK to notify GameLift that the process has started. However, from the fleet events, I suspect your server process crashed afterwards, and the GameLift daemon (“AuxProxy”) then perpetually restarts the process. I’ll have to see the full fleet event to be certain though. Could you please try opening TCP port 22 via update-fleet-port-settings, and then use get-instance-access to get the pem to SSH to the gamelift instance (here is a script that I use)? From there, you can run sudo su to assume the admin account, and go to /local/game or /local/whitewater to checkout the session logs or internal logs. Hopefully you might find insightful error messages there.
1 Like

Thanks James! I haven’t tried ssh-ing into it so that’s a great suggestion. I’ll do what you suggest and report back what I find!

The Gamelift SDK i’m using is Release-4.0.2, which I believe is the latest since I downloaded it only yesterday.

I did have to make a modification, however, to get it to run in IL2CPP. Any reference to log4net had to be commented out, or I’d get a runtime error. At one point, I thought maybe this was why the build failed to “report healthy”, however, when I build using mono with the same modified DLL, it works fine.

Which leads me to another question I have about log4net – is it compatible with IL2CPP? I’ve seen other threads referencing apparent compatibility issues with log4net and IL2CPP, but no solutions in regards to the server side of things.

Here’s one of the other threads relating to this issue. This person was, however, looking at the client side and was able to resolve their issue by using the latest client-side .NET 2.0 Aws SDK plugins. Server-side, I’m not seeing such luck.