jQuery in Action, 3rd edition
The moose likes Servlets and the fly likes no of threads for servlet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "no of threads for servlet" Watch "no of threads for servlet" New topic

no of threads for servlet

Ankit Doshi
Ranch Hand

Joined: Dec 04, 2002
Posts: 222
1. Is there any limit on maximum no of threads that would be created for a servlet by default? (I'm using Tomcat 3.2) If yes, what is the value of this limit?
2. How can I change this limit in Tomcat 3.2? Is there any difference in the configuration of this limit for Tomcat 3 and Tomcat 4?
3. If I increase the maximum no of threads, what OS level limitation would I need to take care of? Like default socket close timeout or what else ...

Mike Nightsky
Ranch Hand

Joined: Aug 18, 2001
Posts: 48
i don't know of such a thread limitation.
the only thing i know what is limitating you is the number of open processes that your os could handle. Linux before kernel 2.6, which you could adjust at compiling the kernel.


Win the opportunity to make money on the Internet<br /><a href="http://sweeps.sitesell.com/minirich.html" target="_blank" rel="nofollow">http://sweeps.sitesell.com/minirich.html</a>
William Brogden
Author and all-around good cowpoke

Joined: Mar 22, 2000
Posts: 13037
In Tomcat 4 there are configuration settings for the default and max number of request processing Threads - I think the same parameters were used in tomcat 3.
Look in server.xml for something like:
minProcessors="5" maxProcessors="75"
I agree. Here's the link: http://aspose.com/file-tools
subject: no of threads for servlet
It's not a secret anymore!