File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Threads and Synchronization and the fly likes URGENT : Thread Problems Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Threads and Synchronization
Bookmark "URGENT : Thread Problems" Watch "URGENT : Thread Problems" New topic
Author

URGENT : Thread Problems

j krishnan
Greenhorn

Joined: Jul 20, 2001
Posts: 27
How many threads can be started simaltaneously in a servlet engine .for eg I am using Tomcat3.2.1 My servlet hangs if i start more than 75 threads.
Peter den Haan
author
Ranch Hand

Joined: Apr 20, 2000
Posts: 3252
That is highly dependent on your JVM; see the Volano report for some comparative figures, esp. the network scalability figure (which is largely governed by threading behaviour). A highly tuned server JVM like JRockit might help you.
Are you implying that you have one servlet which starts up 75 threads? Or are you hitting the servlet engine with 75 simultaneous requests? They are two different things. In the former case, I would wonder whether this is really necessary and/or productive. In the latter case, I would ask what exactly you are doing in your servlet.
- Peter
j krishnan
Greenhorn

Joined: Jul 20, 2001
Posts: 27
My servlet ping to the devices for a particular poling interval and calculates threshold failures etc etc , for this i am staring a timer Object for pinging and stoping it.
Originally posted by Peter den Haan:
That is highly dependent on your JVM; see the Volano report for some comparative figures, esp. the network scalability figure (which is largely governed by threading behaviour). A highly tuned server JVM like JRockit might help you.
Are you implying that you have one servlet which starts up 75 threads? Or are you hitting the servlet engine with 75 simultaneous requests? They are two different things. In the former case, I would wonder whether this is really necessary and/or productive. In the latter case, I would ask what exactly you are doing in your servlet.
- Peter

Peter den Haan
author
Ranch Hand

Joined: Apr 20, 2000
Posts: 3252
Sounds like a job for a Timer and one or more TimerTasks, perhaps at the core of a scheduler servlet or application-scoped scheduler object. Where do the other 74 threads come in?
- Peter
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: URGENT : Thread Problems
 
Similar Threads
JSP service method synchronization
running background process
threading issue in servlet
threadsafe
About sending Email using Servlet