# Data session management for long lived applications

**URL:** https://forum.legato.io/t/data-session-management-for-long-lived-applications/7012
**Category:** Legato Application Framework
**Created:** [April 24, 2026, 8:46am UTC](https://forum.legato.io/t/data-session-management-for-long-lived-applications/7012 "2026-04-24T08:46:08Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Nicolas.B](https://avatars.discourse-cdn.com/v4/letter/n/e68b1a/32.png) [@Nicolas.B](https://forum.legato.io/u/Nicolas.B)
#### Post date: [April 24, 2026, 8:46am UTC](https://forum.legato.io/t/data-session-management-for-long-lived-applications/7012/1 "2026-04-24T08:46:09Z")

</div>

Hi,

I’m looking for guidelines as how to manage AirVantage data sessions for a long lived application.

The context is an FX30S application that daily send a data report to AV session at a fixed time. For that I actually used some timer and avdata API to request a data session, then release it.

My previous colleague used a different method that kept a session open at all time, which I figured was not optimal since we actually only send data like a few seconds a day.

But since I made the change to request session only as needed, the AirVantage timeline is much less readable since every heartbeat sends a whole registration + firmware/application state + de-registration, as before it only showd a registration update.

On another side, I see data session started/ended message in the timeline in a inconsistent way. For a while, it is synced accordingly to the heartbeat and/or the daily data session, but then when the device reboot or if a command is sent the session is seemingly kept open, but the messages from the heartbeat is still registration + firmware/application state + de-registration instead of registration update.

All of this is verry confusing, and the example I found only describe a short term 10 minute application lifetime, so not verry helpfull to this case.

Is there some guidelines, examples or recommandations as how to manage this ? Am I right to use this “request as needed only” way or is the good practice to keep the session alive as long as the application runs ?

---

<div class="post-metadata">

### Author: ![jyijyi](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/jyijyi/32/822_2.png) [@jyijyi](https://forum.legato.io/u/jyijyi)
#### Post date: [April 24, 2026, 8:54am UTC](https://forum.legato.io/t/data-session-management-for-long-lived-applications/7012/2 "2026-04-24T08:54:35Z")

</div>

you can set up PSM mode

So the module with wake up and send the data according to your setting in +CPSMS.
