한국어English日本語简体中文繁體中文DeutschไทยTiếng ViệtРусскийPortuguês (Brasil)EspañolBahasa Indonesia

Game Lag White Paper › L2 Client OS and device

Mobile app sent to the background App suspended in background

Cause ID co-mobile-bg · Primary owner Game team (Client development) · Also Game team (Server development)

Open the interactive card with figures and simulations →

If you leave the game for a moment to check a notification, the OS suspends the app a few seconds later, and meanwhile the server disconnects you.

Why The player leaves the game to read a message or take a call → Effect The game engine pauses gameplay, and the OS soon suspends the app and its networking → On screen Already disconnected on return, so the game reconnects

Symptoms
Disconnect
Factors
Stall, Packet loss
Who’s affected
Just me
When
After sitting idle, During specific actions
Owner
Primary owner Game team (Client development) · Also Game team (Server development)
Game team action items
Client: on return, reconnect automatically right away with a session token (resume without logging in again) without waiting on the dead connection, then fetch the latest state in one go to catch up. Server: when heartbeats stop, clean up the connection but keep the character session for a short grace period (don’t kick it right away), and resume it by session token if the player reconnects within that window.
Ballpark numbers
Game engines usually pause the moment the app goes to the background. iOS suspends the app within a few seconds, or usually within tens of seconds even with extra time granted, and Android 14 and later freezes apps that leave the screen after about 10 seconds.
On the graph
Mass disconnect · Disconnects (heartbeat timeouts), app suspend records
Where to look
Match the app suspend and resume times in the client log (OnApplicationPause in Unity) against the server’s disconnect reasons and times by session ID. On Android, also check the process exit reasons recorded in ApplicationExitInfo (REASON_LOW_MEMORY and so on)
Confirmed if
The client went into suspend just before the server’s heartbeat-timeout disconnect and reconnected right after resuming
Ruled out if
Disconnected while the app was in the foreground: “NAT mapping expiry,” “ISP-shared IP addresses (CGNAT),” or “Wi-Fi ↔ LTE/5G switching”
Check with
Game server or client logs and metrics
Learn more
When memory runs short, phones sometimes kill a backgrounded game outright. That’s why the game starts over from scratch after a trip to the camera or a payment or authentication app. It’s more common on low-end devices.

Sources

  1. Extending your app’s background execution time Apple
    When the app goes to the background, applicationDidEnterBackground gets 5 s before the app is suspended; if it needs more, it requests time with beginBackgroundTask (time left in backgroundTimeRemaining)
  2. Cached apps freezer Android (Google)
    Android 14 and later freezes cached app processes after 10 s; once frozen, all threads stop
  3. Application.runInBackground Unity
    Defaults to false, so the game pauses in the background; Android pauses in the background regardless of the setting, and iOS ignores it
  4. MonoBehaviour.OnApplicationPause(bool) Unity
    Sends OnApplicationPause(true/false) to all MonoBehaviours when the app is paused or resumed
  5. ApplicationExitInfo Android (Google)
    REASON_LOW_MEMORY: the system’s low memory killer terminated the app process (devices that don’t support it report REASON_SIGNALED with SIGKILL)

See also

Same layer: L2 Client OS and device

Same symptom (Disconnect), other layers

View the interactive card with figures and simulations