Forum Discussion
Remover APM Session after send response for user
- Sep 12, 2018
I found the solution I needed add the HTTP Header "Connection: Close" during response of F5 to client.
When the F5 close APM session without "Connection: Close" in HTTP Header, the client will use the TCP Connection for another APM session and the F5 will close the TCP Connection when delete the first APM session.
It is the explanation for I have error when I have load, the client open another APM session using a same TCP Connection.
The best iRule that I make for this example is:
when HTTP_RESPONSE_RELEASE { HTTP::header insert "Connection" "Close" ACCESS::session remove }
Thanks all.
I thought of something you could try. In your code, you delete the APM session yourself. Might it be an option to let APM clean up its own sessions? Maybe it knows better what to delete because its the "cleanup" process. I know you have a session limit to monitor, but you set the timeout very short.
Edit: you might have to set this during creation of the APM session, because when I tried this:
when HTTP_RESPONSE { ACCESS::session data set session.inactivity_timeout 30}
it didn't work. It seems you can't update inactivity_timeout after an APM session is complete and allowed.
So either you set it for the global APM Policy, or you could use an event in your APM flow that sets the timeout based on other parameters.
when ACCESS_POLICY_AGENT_EVENT { switch [ACCESS::policy agent_id] { "set_session_inactivity_timeout { if {...} { ACCESS::session data set session.inactivity_timeout ...} } } }
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