Forum Discussion
APM subsession variables disappear before session is terminated
- Sep 10, 2024
Cool use of subsessions! There's a lot of power here, but parts of it are hard to understand. And hard to explain!
The subsession object has some properties:
The "max subsession life" essentially says how long the variables will last in the sessiondb. You may set this value up to 604800, so that the subsession can last 1 week. Keep in mind that the subsession relies on the main session, so it also must stay alive in order to hold the data.
If you haven't yet discovered the "sessiondump" CLI command, it's very helpful when working with subsessions.
Also I'm fairly sure you can use iRules to copy subsession vars into session vars when executing them (via iRule agent) inside of the subession. When you use the set-variable agent in a subsession, it will only save subsession variables (as you've found). This is more of a convenience thing than a limitation.
Hi Lucas
Thanks for the reply. Changing the "Max subsession life" to cohere between the Per-Request and Session policy seems to have solved the issue.
I also had to modify the inactivity timeout to 900 seconds, as this was the default session policy timeout value ( I found that having mismatches between the two caused the variable to disappear before the session was marked inactive and reinitiated. Having the subsession timeout does not trigger a "rerun" of the subroutine)
The subsession variable now persists and follows the session. Thanks a lot!
Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com