i have java web application deployed tomcat. in web.xml specify maximum idle timeout. however, monitor uptime of web application pinging number of pages , checking 200 response. each ping initiates session , multiple pings every few seconds, rack large number of sessions.
these sessions timeout, i'd love remove them sooner.
in tomcat "sessions administration" page, can tell fall category. "inactive time" greater few seconds, "used time" 00:00. says, made single request , have not returned make another.
question
is there way timeout these inactive single requests without affecting users?
additional info
- our session timeout set pretty high, on hour. customer knows best =)
- our web framework heavily ajax based, having no followup requests pretty unlikely real user.
- to best of our knowledge, have no control on session handling monitoring tool's side.
of top of head:
- use same session - make initial request , save session id, , make every subsequent request using id.
- send special header when pinging (for example
x-invalidate-session
). implement filter invalidate session after request. - measure performance , without "ping" requests. if there's no significant difference, stop worrying it.
i'd question broad so, since there more possibilities of solving this.