Device_session_ttl change for already active tag

Hi Team,
I have 5000 tags active with device_session_ttl=“744h0m0s” which is 31 days.
but we need to define this value to some infinite value or may be 2-3 years.

is it ok to change this value now in the config and how it will reflect for already active tags?
Also, Can we make device session never expires anyway?

Thanks

This was changed when device activations moved into PostgreSQL and no longer expire. If you’re on the latest ChirpStack v4, you’re already there.

If not, changing the config file will not updated existing expirations. You’ll need to go into Redis to do it.

Thank you for your quick reply.

We are still on chirpstack 3 and we want to increase this value(is there any max value for this?) so tag will not deactivate if it is in inventory for longer period of time.

Where do I need to change in the redis?

@Ashish_Patil

for chirpstack v3 please increase device_session_ttl value in network server configurations

Thanks

thank you but will this change reflect for all already activated device as well?

yes, it will reflect all activated devices once they send uplinks

Thank you for quick reply.

I found there are multiple cache value under lora folder. same tag will have some cache in “as” folder and “ns” folder also some of them related to Mac Command

do we need to take care for all of them so device session do not expire?

Thanks

Hello, we are using Chirpstack v4, but just saw that a number of our devices lost their activations, for no reasons that we understood so far. Reading this thread, an expiration of the TTL could explain what we saw. How can we check what TTL is set in redis/postgresql for our devices?

You can upgrade to latest ChirpStack version.
Since v4.7, ChirpStack stores keys in DB. So no more expiration.

Please note that when updating the device_session_ttl, the new TTL value will only be set after a new uplink / device-session change. E.g. on each write (triggered by an uplink) the TTL values is re-newed to the value set in device_session_ttl.

1 Like