Product Benefits Pricing Guides Docs About Contact us Try it out
Performance

Android 17 MemoryLimiter Exit Tracking

Android 17 MemoryLimiter exit tracking: capture the new app-exit reason in Sentry so silent memory kills stop hiding as mystery session drops.

· 3 min read

Android 17 adds a memory limiter that can end your app when it uses too much memory. The system records the event as an application exit, but there is no crash dialog and no stack trace, and your usual crash tooling never sees it. To a user the app simply closes. To your dashboards it looks like a short session, or a user who never came back.

Sentry’s Android SDK 8.59.0 now recovers these exits from ApplicationExitInfo on the next launch and reports them. That gives you a signal, but only if you set it up to be read properly. Without a dedicated metric, memory kills get blamed on “bad networks” or “users getting bored”, and the screens that really cause them never get fixed.

Data Points to Track

  • app_exit_reason (memory_limiter, low_memory, crash, anr, user_requested, other), taken from the recovered exit record
  • exit_importance (foreground, visible, service, cached), so you can tell a kill during active use from one in the background
  • last_screen and last_feature before the exit, taken from breadcrumbs
  • resident_memory_mb and device_ram_class, if you sample them
  • session_duration_before_exit and exit_to_next_launch_seconds
  • os_api_level, app_version and sdk_version on every event
  • Recovery outcome: did the user relaunch within five minutes (true / false)?

Setup Steps

  1. Upgrade the Sentry Android SDK to 8.59.0 or later and confirm app-exit recovery is enabled in your configuration.
  2. Build and run against API 37 on a device or emulator. Older versions will never produce the new exit reason, so your test needs the right OS.
  3. Tag recovered exits with app_exit_reason and exit_importance so they can be filtered on their own, not mixed in with crashes.
  4. Add memory context. Sample resident memory at key moments such as after image-heavy screens, and attach the last value to the next event.
  5. Keep breadcrumbs for the final screens. A recovered exit is only useful if you can see where the user was.
  6. Create an alert on the memory-limiter exit rate per 1,000 sessions, split by app version, and check it for a week before setting a hard threshold.

Actionable Insights

Start with the share of Android 17 sessions that end in a memory-limiter exit. If it is near zero, you have a monitoring baseline and nothing more to do. If it is a few percent, the last-screen breakdown will normally point to one or two culprits, such as a gallery, a map or a video preview.

Compare foreground and cached exits. Foreground kills mean users are losing work and need urgent fixes. Cached kills are normal system housekeeping and usually matter less.

Finally, look at the relaunch rate. If users who hit a memory exit return quickly, the impact is small. If many never come back, treat memory reduction as a retention project, not just a stability one.