wood burning stoves 2.0*
The moose likes Tomcat and the fly likes by default tomcat can only process two concurrent requests for the same JSP page? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "by default tomcat can only process two concurrent requests for the same JSP page?" Watch "by default tomcat can only process two concurrent requests for the same JSP page?" New topic
Author

by default tomcat can only process two concurrent requests for the same JSP page?

Robert Strong
Ranch Hand

Joined: Sep 10, 2002
Posts: 84
hi, I encountered the issue of the limited concurrency in tomcat.

In my code, I use Apache HttpClient to send multiple concurrent requests from the client box to the JSP page on server box. Surprisingly, from the server-side log, I noticed tomcat can only process two requests for the particular JSP page concurrently, the requests after the first two would be processed sequentially.

I guess JSP page would be compiled into the thread-safe servlet, which should be able to be called by multiple threads concurrently. I'm not sure where I can change the configurations?

any help appreciated!
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15662
    
  15

By default, Tomcat can easily process two hundred concurrent requests per JSP page. Or servlet, for that matter. In fact, on my quad-core system, it can process up to 4 of those requests not only concurrently, but simultaneously. The only time that breaks down is when you have more incoming requests than you have processor threads in the thread pool.

If you're seeing what appears to be serial operation, you're either processing so fast that the concurrent capabilities aren't apparent (which is good, since you're getting fast turnaround), OR one of the stages in the pipeline is bottle-necking them. Quite likely you're not doing the client requests as asynchronous operations.


Customer surveys are for companies who didn't pay proper attention to begin with.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: by default tomcat can only process two concurrent requests for the same JSP page?
 
Similar Threads
NX: URLyBird - Data Access
Concurrent Request Processing Issue
how to prevent double clicks on hyper link.
isThreadSafe
SingleThreadModel- when to choose that approach?