# User Sessions FAQ

Frequently asked questions about User Sessions charts.

Source: https://amplitude.com/docs/analytics/charts/user-sessions/faq

---

On this page

- [Why is my User Sessions chart empty?](#why-is-my-user-sessions-chart-empty)
- [Why are there so many zero-length sessions in my User Sessions chart?](#why-are-there-so-many-zero-length-sessions-in-my-user-sessions-chart)
- [When does the Amplitude Start Session event trigger?](#when-does-the-amplitude-start-session-event-trigger)
- [Why are there empty sessions with no active events in the user event streams?](#why-are-there-empty-sessions-with-no-active-events-in-the-user-event-streams)
- [Why do some mobile sessions contain a gap of over five minutes, or why do some sessions last an unusually long time?](#why-do-some-mobile-sessions-contain-a-gap-of-over-five-minutes-or-why-do-some-sessions-last-an-unusually-long-time)
- [Does a change to a custom session apply retroactively?](#does-a-change-to-a-custom-session-apply-retroactively)
- [Does the custom session definition affect the raw data?](#does-the-custom-session-definition-affect-the-raw-data)
- [Does a server-side integration between Amplitude and Segment provide a Session ID automatically?](#does-a-server-side-integration-between-amplitude-and-segment-provide-a-session-id-automatically)

# User Sessions FAQ

This page answers common questions about the User Sessions chart.

## Why is my User Sessions chart empty?

The User Sessions chart requires valid session IDs for events. A valid session ID has a value other than `-1`. To check whether the events in your project have session IDs, check any user's event streams.

## Why are there so many zero-length sessions in my User Sessions chart?

Two likely causes explain a large number of users in the "0 sec" session data point in the [User Sessions](/docs/analytics/charts/user-sessions/user-sessions-track-engagement-frequency) chart.

**Potential cause #1: Out-of-session events**

Amplitude calculates session length for events sent with the [HTTP API](/docs/data/sources/instrument-track-sessions) using this formula:

`max(client_event_time) - session_id`

For these events to count as part of a session, the [session ID](/docs/data/sources/instrument-track-sessions) must be a timestamp reflecting the beginning of the session in epoch time.

**Potential cause #2: You're tracking the Start Session event, but no other events**

If your project allows sending start or end session events (which you can enable in the [Android SDK](https://help.amplitude.com/hc/en-us/articles/115002935588-Android-SDK-Installation#track-sessions) or [iOS SDK](https://help.amplitude.com/hc/en-us/articles/115002278527-iOS-SDK-Installation#track-sessions)), your app sends a `Start Session` event to Amplitude every time it launches in the foreground. If Amplitude receives no other events to log after this, it sets the [session length](/docs/data/sources/instrument-track-sessions) to zero.

Amplitude's [Microscope](/docs/analytics/microscope) feature lets you examine a user's activity, so you can quickly determine which of these causes is the issue.

## When does the Amplitude Start Session event trigger?

The event triggers when the app enters the foreground, or when the SDK initializes in the foreground.

## Why are there empty sessions with no active events in the user event streams?

When you use mobile SDKs with start or end session events enabled, you might see sessions that include only the `Start Session` and `End Session` events. A few reasons explain this:

- The user enters and leaves the app without triggering custom events.
- The user triggers events that are blocked or deleted in your tracking plan, so Amplitude doesn't ingest them.
- Certain activities in the app, like backend notifications or identify calls, can bring the app to the foreground without triggering an actual event.

## Why do some mobile sessions contain a gap of over five minutes, or why do some sessions last an unusually long time?

Some common reasons:

- The default session timeout window changed. Mobile SDKs use five minutes by default.
- Activities in the app, like backend notifications or identify calls, can bring the app to the foreground between two actual sessions, leading to unexpectedly long sessions.

## Does a change to a custom session apply retroactively?

Yes. After you change the custom session definition, Amplitude groups all sessions, including those logged before the change, based on the new definition.

## Does the custom session definition affect the raw data?

It doesn't affect the raw data, and you can revert it to the default session definition at any time.

## Does a server-side integration between Amplitude and Segment provide a Session ID automatically?

Go to [the FAQ article on Segment/Amplitude integration](/docs/data/troubleshooting/integrations-and-sources#segment-amplitude-integration) to learn more.

Was this helpful?

<!--$-->

<!--/$-->
