Troubleshooting

Note: The content on this page pertains to Multiplay Hosting, available on the Unity Cloud Dashboard. If you’re using Clanforge, refer to Clanforge documentation.

Troubleshooting servers

Missing server instances

When you first create a fleet, it might take several minutes for the new servers to display in the Unity Cloud Dashboard.

If the servers are still not there after 15 minutes, check the scaling settings for each region within your fleet. The servers might not appear in the Unity Cloud Dashboard if you have a Minimum servers setting of less than one.

Servers crashing

Servers sometimes crash, ending any active game allocations on that server. The following list details of some common reasons a server might crash.

  • The server is using too many resources for the number of players.
  • There’s something wrong with the build configuration.
  • The build executable doesn't exist.

If a server is crashing and you are sure there isn't a bug in your build, reach out to the customer success team.

Note: Before Multiplay Hosting restarts a build executable, it tries to dump the process to allow you to check the stacktrace. This appears in logs as a SIGSEGV.

Servers fail to start

Servers can sometimes fail to start up, which prevents you from using the server in an allocation. The following list details some common reasons a server might fail to start.

  • There’s something wrong with the build executable.
  • The server is using too many resources for the number of players.
  • There’s something wrong with the build configuration.

Too many server instances

If more server instances than you expect appear in the Unity Cloud Dashboard, it might be due to how Multiplay Hosting manages server density according to your usage settings.

Multiplay Hosting creates these two additional servers to make the most of the available capacity. By default, these additional servers are in a stopped state and offer a quick way of increasing server availability without needing to start a new machine.

Troubleshooting installations

Slow build installations

Usually, a build installation shouldn’t take longer than five to 15 minutes. The following list details some common reasons why installing a game image might take longer than expected.

  • The build is exceedingly large.
  • You’re updating many servers simultaneously.

Troubleshooting usage settings

Usage settings not optimized

You might have to adjust the server density values several times before you find the ideal value. For example, if you notice that servers running this build configuration lag or exhibit performance issues, adjust the server density settings.

One of the best ways to find the ideal usage settings for your game server is to make CPU value changes in increments and decrements of about 100 MHz and RAM value changes in increments and decrements of about 100 MB. Each time, you make an change, test the build to view how your servers perform with the build.

Servers using too much CPU

There are many reasons why a server might use more CPU than you expect. However, one common reason is that the main game loop runs as fast as the CPU allows, consuming all resources. Multiplay Hosting detects this and after a grace period, stop the server.

You can prevent this by limiting the application target frame rate and the number of vertical syncs that pass between each frame.

The application target frame is controlled by the Application.targetFrameRate setting. In most cases, setting it to a value around 60 prevents the game loop from using too much CPU.

Refer to the Application.targetFrameRate script reference documentation.

Application.targetFrameRate = 60

The QualitySettings.vSyncCount setting controls the vertical syncs your game uses even without a display. In most cases, setting it to 0 prevents the game loop from using too much CPU. Refer to the QualitySettings.vSyncCount script reference documentation.

QualitySettings.vSyncCount  = 0

Troubleshooting logs

Missing files or logs

You can use Multiplay Hosting to surface server files through the Unity Cloud Dashboard. Before you can access your server files:

  • Specify the location of your logs and files in the build configuration.

  • Specify the correct log and file locations in the build configuration through the launch parameters, a configuration variable, or both. Like the query protocol, the log and file locations implemented in a build must match the log and file location in all build configurations pointing to that build. The following code blocks show how to use the $$log_dir$$ and $$file_dir$$ configuration variable in the launch parameters.

-logFile $$log_dir$$/Engine.log -dataPath $$files_dir$$

Note: If you built your game using Unreal Engine, you’ll need to redirect your logs before you can access them from the Unity Cloud Dashboard.

Note: If your server executable is a Unity build, use -logFile $$log_dir$$ in the launch parameters. If you're using a Unity build and not seeing any log files in the Unity Cloud Dashboard, try using -logFile $$log_dir$$/logfile.log.

Troubleshooting Editor

Error building Player: Currently selected scripting backend (Mono) is not installed

Known issue with Unity 2021.3.10f1. and up.

This occurs when attempting a Multiplay Hosting build while having a current build target that is different than Dedicated server, and the selected scripting backend is not available.

Solutions:

  • Upgrade to the latest version of your current LTS (preferred), OR
  • Switch to the Dedicated Server build target before performing a Multiplay Hosting build, OR
  • Add the missing scripting backend using the UnityHub

Note: If your server executable is a Unity build, use -logFile $$log_dir$$ in the launch parameters. If you're using a Unity build and not seeing any log files in the dashboard, try using -logFile $$log_dir$$/logfile.log. For this use case the $$files_dir$$ parameter can also be used.