How many "simultaneous users" can a Tomcat server support and where do I find this setting? I've read on the internet that Tomcat is limited to 15 "simultaneous users" and that Tomcat supports "unlimited numbers" of users. What's the real story?
Tomcat doesn't have such a setting and you shouldn't trust everything you read on the internet!
A limitation like 15 simultaneous users would make the large scale, high availability Tomcat deployments that are already powering banks, government applications and large corporations completely impossible. On the Apache Tomcat Users mailing list, for example, we see people fairly frequently who are debugging their applications under load tests simulating thousands of concurrent users.
One of the advantages of using software like Tomcat is that it provides the Servlet Spec environment, (which is usually enough to support most applications with a few Apache Commons libraries or the use of frameworks like Struts and Spring), but it's lightweight and uses comparatively little in the way of system resources itself.
The amount of concurrent users will depend on the server hardware (processors, memory), the types of resources being used within the application and what your application is actually doing. A fictional application which generates PDF reports on demand from large amounts of data, taking minutes for each request is going to need substantially more server resources to support a similar number of users to an application which is serving largely static or cached resources.
In Tomcat versions 6.0 and up, the best way to configure the number of threads the Connector uses is via the Executor element. http://tomcat.apache.org/tomcat-6.0-doc/config/executor.html
The default setting for the maxThreads attribute is 200, which should be enough to get most applications started. In fact, in my experience you'll need to add more servers to scale up because of application memory usage before the maxThreads attribute gets too high.
So, to answer each question: Tomcat is not limited to 15 users; it will support however many concurrent users your application(s) can support.
Popular Links