• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Robert Strong
Ranch Hand
Posts: 84
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 18108
51
Android Eclipse IDE Linux
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic