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 Limit the number of requests Tomcat can accept Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Limit the number of requests Tomcat can accept" Watch "Limit the number of requests Tomcat can accept" New topic
Author

Limit the number of requests Tomcat can accept

Mike Anna
Ranch Hand

Joined: Jul 08, 2007
Posts: 117
Hi,

I was wondering if some one could please let me know if there is a way I can limit tomcat from accepting the number of requests it can cater ?

I did google for it and it gave me replies where apache was guarding tomcat and that the number of requests can be limited easily on apache. However I am looking to do this on tomcat.

thanks
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41489
    
  53
Yes, that's possible. Check the conf/server.xml file - it has maxThreads attributes for each Connector. Those limit the number of request processing threads Tomcat will spawn, and thus the maximum number of simultaneous requests Tomcat will work on.


Ping & DNS - my free Android networking tools app
Mike Anna
Ranch Hand

Joined: Jul 08, 2007
Posts: 117
Thanks Ulf for your reply
the maximum number of simultaneous requests


I know that it means the maximum no. of requests it can process at a time. That would also mean, that, THAT is the maximum no. of requests it will accept anytime right ?

thanks again
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41489
    
  53
I'm not sure if connections beyond the max are rejected, or put into a queue for eventual servicing. You'd have to consult the source for that.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Limit the number of requests Tomcat can accept