Limit Number of Concurrent Active Sessions
It is possible to limit the number of concurrent active sessions in Tomcat. If the limit is reached, new users will not be able to access the web application anymore until previous sessions have ended. To set a limit:
Open the folder “<Tomcat installation>/webapps“ and open the file
ADONIS13_0.warwith a file archiver. Edit the file
META-INF/context.xmlwhich can be found inside.
context(<Context>) definition with a new
manager(<Manager>) element and add the attribute "maxActiveSessions” with a limit of your choice. Save the changes afterwards.
<?xml version='1.0' encoding='UTF-8'?> <Context path='/*' cookies='true'> <Manager maxActiveSessions = "1000"/> </Context>
Use the default manager and impose a maximum limit of 1000 parallel active sessions.
Done! Restart the Apache Tomcat web server for the configuration changes to become effective.