File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Tomcat and the fly likes Tomcat blocking requests Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Tomcat blocking requests" Watch "Tomcat blocking requests" New topic
Author

Tomcat blocking requests

Fred Leclerc
Greenhorn

Joined: Aug 29, 2005
Posts: 3
I have created a web application with struts 1.3.5 It is deployed on Tomcat 5.5.25 I am presently running stress tests and I am seeing a pretty weird behavior, it goes like this...

I start the test, and response times are acceptable, around 300 ms in average. What is strange is that about 0.03% of requests have a ridiculous response time, over 500000 ms ( yes, 500 thousand milliseconds !! ). Whatever the number of threads I use, from 5 to 50, the same behavior occurs sooner or later... for exaclty the same http requests. The application connects to a postgresql server, with the apache commons connection pool.

Could it be that postgres is accepting the connection although it's too busy to answer it ? FYI, postgres has 250 available connections, and uses 4 or 5 at the same time at peak traffic simulations.

My tomcat configuration is close to default, 500 threads available ... 2 Gb for the jvm ...

I am also wondering if connection timeout configurations could be a plausible issue, since connections to tomcat don't seem to die at all ?

Thanks for your assistance, very appreciated.

ps .. feel free to ask about other configuration parameters, I'll provide more info if needed.
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

How are you creating your connections?
Are you using Tomcat's container managed connection pooling?


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Tomcat blocking requests