• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
  • Mikalai Zaikin

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

Ranch Hand
Posts: 84
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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!
Saloon Keeper
Posts: 27888
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
Don't get me started about those stupid light bulbs.
    Bookmark Topic Watch Topic
  • New Topic